@ckeditor/ckeditor5-ai 47.3.0-alpha.5 → 47.3.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/dist/index.js +5 -5
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +15 -15
- package/src/aiactions/aiactions.js +1 -1
- package/src/aiactions/model/aiactionsinteraction.js +1 -1
- package/src/aiactions/model/aiactionsreply.js +1 -1
- package/src/aiassistant/adapters/aiadapter.js +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant/aiassistant.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- package/src/aiassistant/aiassistantui.js +1 -1
- package/src/aiassistant/legacyerrors.js +1 -1
- package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
- package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
- package/src/aiassistant/ui/form/aiformview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
- package/src/aiassistant/ui/form/prompthistory.js +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
- package/src/aiassistant/utils/common-translations.js +1 -1
- package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
- package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
- package/src/aiballoon/ui/aiballoonview.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.js +1 -1
- package/src/aichat/ui/aichatfeedview.js +1 -1
- package/src/aichat/ui/aichatheaderview.js +1 -1
- package/src/aichat/ui/aichatview.js +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
- package/src/aichat/utils/eventnames.js +1 -1
- package/src/aichat/utils/promisequeue.js +1 -1
- package/src/aichathistory/aichathistory.js +1 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.js +1 -1
- package/src/aichathistory/model/aichathistoryconversations.js +1 -1
- package/src/aichathistory/model/aichathistoryitem.js +1 -1
- package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
- package/src/aichathistory/ui/aichathistorylistview.js +1 -1
- package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
- package/src/aichathistory/ui/aichathistoryview.js +1 -1
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.js +1 -1
- package/src/aicore/model/aicapabilities.js +1 -1
- package/src/aicore/model/aicontext.js +1 -1
- package/src/aicore/model/aiinteraction.js +1 -1
- package/src/aicore/model/aimodels.js +1 -1
- package/src/aicore/model/aireply.js +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +2 -2
- package/src/aicore/pipeline/airesponseparser.js +2 -2
- package/src/aicore/ui/aidisclaimerview.js +1 -1
- package/src/aicore/ui/aiskeleton.js +1 -1
- package/src/aicore/ui/aispinner.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/utils/common-translations.js +1 -1
- package/src/aicore/utils/createresizebutton.js +1 -1
- package/src/aicore/utils/documentposition.js +1 -1
- package/src/aicore/utils/documentrange.js +1 -1
- package/src/aicore/utils/eventnames.js +1 -1
- package/src/aicore/utils/geteditorfromcontext.js +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
- package/src/aicore/utils/htmlparser.js +1 -1
- package/src/aicore/utils/htmlstreamer.js +1 -1
- package/src/aicore/utils/scrollmanager.js +1 -1
- package/src/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +1 -1
- package/src/aiquickactions/aiquickactionsui.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
- package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
- package/src/aireviewmode/model/aireviewchecklist.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodegeneralerrorview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitabs/aitabsmainview.js +1 -1
- package/src/aitabs/tabs/aitabsview.js +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +1 -1
- package/src/aitabs/tabs/tabpanelview.js +1 -1
- package/src/errors.js +1 -1
- package/src/errorsmap.js +1 -1
- package/src/index.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x722d79=_0x5d0d;(function(_0x152726,_0x3fa067){const _0x3873ae=_0x5d0d,_0x264994=_0x152726();while(!![]){try{const _0x15ccab=-parseInt(_0x3873ae(0x20f))/0x1*(-parseInt(_0x3873ae(0x195))/0x2)+parseInt(_0x3873ae(0x26c))/0x3*(-parseInt(_0x3873ae(0x2c0))/0x4)+parseInt(_0x3873ae(0x210))/0x5*(-parseInt(_0x3873ae(0x23b))/0x6)+parseInt(_0x3873ae(0x1a9))/0x7+parseInt(_0x3873ae(0x2d3))/0x8*(parseInt(_0x3873ae(0x2a3))/0x9)+-parseInt(_0x3873ae(0x2ce))/0xa*(parseInt(_0x3873ae(0x19f))/0xb)+-parseInt(_0x3873ae(0x20c))/0xc;if(_0x15ccab===_0x3fa067)break;else _0x264994['push'](_0x264994['shift']());}catch(_0x20d857){_0x264994['push'](_0x264994['shift']());}}}(_0x149e,0x35b6b));import{ContextPlugin as _0x2222db,Editor as _0x223500}from'ckeditor5/src/core.js';function _0x149e(){const _0x12217b=['setIsUploadInProgress','setFeedItemRenderingStrategy','_aiChatModels','_aiChatUi','config','getRoot','_aiEditing','getConversation','ai-chat-url-upload-failed','AITabs','AI_BALLOON_HEADER_TITLE','uid','message','filter','populateSourceResourceBalloon','removeSelectionFromChatContext','AIConnector','collaboration.channelId','addContextItem','ai.availableReplyActions','focusPromptInput','addUrlToContext','has','startInteraction','howMany','AI_CHAT_INVALID_REQUEST','sources','current-document','_removeFromContext','type','clearConversationContextUI','anchorId','getOperations','documentContextContent','ai-chat-source-resources-load-failed','removeFeedInteraction','dislike','showChangeInText','clearPendingContextUI','getDocumentData','like','split','interactionStarted','revert','handleUserInteraction','remove','1328AOhJwS','map','getChildren','_logError','_updateRatings','afterInit','editors','ai.chat.models.displayedModels','removeMarker','requires','506GGELqP','ai.chat.models.defaultModelId','_getDocumentRangeForReplyChanges','Liked\x20response','createRange','updateFeedItemAIReplySuggestionContent','getGroupId','applySuggestion','ready','getDiff','2121665QbBvxr','showNext','resizedTabs','isUploadInProgress','setLoadingMessage','ai-chat-context-file-too-many-pages','scrollFeedToSuggestion','sourceResourcesLoaded','addFeedItemAISuggestion','uiId','main','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','pluginName','upsertAIChatRating','stop','isStarted','AIChatController','resource','updateFeedItemAIReplyContent','updateCapabilities','setConversationTitle','createPositionAt','rejected','context','mapper','reasoningFinished','sourceId','addSelectionToChatContext','abortPromptStream','start','_batchToChanges','rootName','stopListening','version','_removeAISelectionMarkers','getReply','addFeedItemUserMessage','nextSibling','ai-request-aborted','_insertSuggestion','contextItems','document','updateContent','reasoningStarted','node','contextItem','contextItemAdded','updateCurrentDocumentInContext','addFeedInteractionHeader','new','_toggleWebSearch','addDocumentToContext','addFeedItemAIReply','ai-chat-context-invalid-data','markers','messageId','_aiConnector','_handleStartConversation','resizeTabs','ai-chat-controller-mouse-over','replyContentUpdated','resetMessageInput','AI_CHAT_CONTEXT_INVALID_DATA','root','ai-chat-conversation-not-found','getAttribute','closeSourceResourceBalloon','isCurrentDocumentInContext','getTransformedByOperation','_previewedChangeGroup','_integrateEditor','isLoading','ai-chat-conversation-init-failed','isOpen','updateFeedItemAIReplySources','ai-chat-resource-load-failed','chat','applyOperation','_balloonShowDiff','getChildAtOffset','AI_CHAT_RESOURCE_LOAD_FAILED','addOperation','interactionDestroyed','isDocumentOperation','dialogClosed','ai-chat-conversation-start-failed','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','AIChatUI','DocumentCompare','ai-no-track-changes','toString','toggleWebSearch','view','Undo','getSelectionText','end','selectModel','ai-chat-invalid-request','data-id','420648rUtUWD','viewRangeToDom','interactionFinished','371NMUYlA','431155VQfglY','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','index','resourceStateChanged','setIsMaximized','alignToTop','setSelectedModel','unshift','startsWith','model','listenTo','disableControls','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','full','isPremiumPlugin','toggleSuggestionDisplayMode','close','push','activateTab','startAutoScroll','contextSent','isModelAvailable','commands','ai-chat-context-unsupported-file-type','isCurrentDocumentInConversation','indexes','sendMessage','marker','ai-chat-missing-channel-id','addContextOptionsChanged','setChangeGroupState','sendUserMessage','AI_CHAT_ABORTED_MESSAGE','indexOf','ai-chat-context-form-data-size-limits-exceeded','Disliked\x20response','delete','_updateReplyContent','AI_CHAT_UNABLE_TO_START_CONVERSATION','_createFromRanges','AI_CHAT_GENERIC_ERROR','interactionCreated','_flushLastInteractionUI','6eJpySK','_showConversationHistory','getRanges','contextItemRemoved','_startConversationSafely','history','options','editing','_handleUIUserMessage','updateResourceState','removeContextItem','mouseOverSuggestion','setContextItemLoading','locale','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','text-delta','updateConversationTitle','source','change','ai-chat-context-file-too-large','fetchConversation','getInteractionAndReplyById','state','length','add','set','ai-chat-controller-no-active-conversation','insertSuggestion','hideFakeVisualSelection','showFakeVisualSelection','createPositionFromPath','TrackChangesEditing','_setIsMaximized','log','Showing\x20conversation\x20history...','addResourceToContext','static','addSelectionToContext','outdated','baseVersion','setModel','AIEditing','getDocumentContext','$graveyard','forEach','plugins','createConversation','conversationInitialized','webSearchFinished','831507jPTgyQ','range','capabilitiesUpdated','_applyOperationsAsSuggestions','undo','loadConversation','AI_CHAT_UNTITLED_CONVERSATION','ai-chat-file-upload-failed','interactionId','modelSelected','init','removeFromContext','resetConversationTitle','webSearchStarted','getContentParts','error','_scrollToSuggestionRange','ai.chat.context','getChild','open','handleRemovedConversation','maxOffset','toggleLoadingSkeleton','get','replyCreated','loadSourceResources','streaming','enableControls','stopInteraction','isDisabled','content','findIndex','toggleReasoning','finishInteraction','addFeedItemStaticMessage','_openBalloonFor','uploadProgressChanged','redo','removeSelectionFromContext','lastInteraction','showDiff','changes','addFeedItemError','getFirstRange','TrackChanges','ai-conversation-','addFilesToContext','load','_toggleReasoning','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','toViewRange','getInteraction','accepted','_applySuggestion','query','135cMKuJt','children','changeGroups','data','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','addCurrentDocumentToContext','removed','sourcePosition','AI_CHAT_CONTEXT_FILE_TOO_LARGE','addFileToContext','cloneNode','getMarkersGroup','rejectSuggestion','setAddContextOptions','parse','partIndex','domConverter','isInContext','resize','hasChanges','setConversationContext','updateFeedItemAIReplySuggestionPartState','modification-delta','mouseLeaveSuggestion','startConversation','path','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','replies','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','4xTavfX','resourceId','find','selection','contextItemLoadingEnded','replyId','selectedModel','showPrevious','ai-chat-context-unsupported-type','slice','pending','getPath','isOfficialPlugin','resources','55240HSmQui','activeConversation','replyChangeGroupStateUpdated','batch','from','172336VVSKhk','_stopLastInteraction'];_0x149e=function(){return _0x12217b;};return _0x149e();}import{CKEditorError as _0x56bfe4,logError as _0x403c82,scrollViewportToShowTarget as _0x2ac001,uid as _0x567464}from'ckeditor5/src/utils.js';import{AIConnector as _0x371ca2}from'../aicore/aiconnector.js';import{AITabs as _0x15b59e}from'../aitabs/aitabs.js';import{AIChatConversation as _0x5188f9}from'./model/aichatconversation.js';import{getTranslation as _0xc3a8c}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x5dc995}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0xaf499c}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x405bb5}from'./model/aichatmodels.js';import{getEditorFromContext as _0x4dfe45}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x1e0fe3,DATA_ID_MODEL_ATTRIBUTE as _0x47a7f5}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x316879,getOperationsFromReply as _0x3fe6}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x118718,getMinimalSelection as _0x136d73}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x419998,_DetachOperation as _0x347c6f}from'ckeditor5/src/engine.js';import{findOne as _0x5c46b8,getAttribute as _0x174d3e,serialize as _0x9af624,Document as _0x301a4d,findByAttribute as _0x244b7e}from'../aicore/utils/htmlparser.js';import{IconAI as _0x5c5b7c}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x72ff3}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';function _0x5d0d(_0x384c83,_0x4caa46){const _0x149e86=_0x149e();return _0x5d0d=function(_0x5d0d58,_0x1e46bd){_0x5d0d58=_0x5d0d58-0x16e;let _0x4416bf=_0x149e86[_0x5d0d58];return _0x4416bf;},_0x5d0d(_0x384c83,_0x4caa46);}import{AIBalloon as _0x1641f1}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x2222db{[_0x722d79(0x2db)];[_0x722d79(0x1e1)];[_0x722d79(0x2d8)];[_0x722d79(0x2d7)];[_0x722d79(0x1c7)]=new Map();[_0x722d79(0x1ee)]=null;[_0x722d79(0x1f7)]=!0x1;static get[_0x722d79(0x19e)](){return[_0x371ca2,_0x1641f1,_0x1e0fe3];}static get[_0x722d79(0x1b5)](){const _0x2adda9=_0x722d79;return _0x2adda9(0x1b9);}static get[_0x722d79(0x2cc)](){return!0x0;}static get[_0x722d79(0x21e)](){return!0x0;}[_0x722d79(0x276)](){const _0x562a99=_0x722d79;this[_0x562a99(0x1e1)]=this[_0x562a99(0x1c0)][_0x562a99(0x268)][_0x562a99(0x283)](_0x562a99(0x177)),this[_0x562a99(0x2d8)]=this[_0x562a99(0x1c0)][_0x562a99(0x268)][_0x562a99(0x283)](_0x562a99(0x200)),this[_0x562a99(0x2db)]=this[_0x562a99(0x1c0)][_0x562a99(0x268)][_0x562a99(0x283)](_0x562a99(0x264)),this[_0x562a99(0x2d7)]=new _0x405bb5({'connector':this[_0x562a99(0x1e1)],'availableModels':this[_0x562a99(0x1c0)][_0x562a99(0x2d9)][_0x562a99(0x283)](_0x562a99(0x19c)),'defaultModelId':this[_0x562a99(0x1c0)][_0x562a99(0x2d9)][_0x562a99(0x283)](_0x562a99(0x1a0))});const _0x33c077=this[_0x562a99(0x1c0)][_0x562a99(0x268)][_0x562a99(0x283)](_0x562a99(0x170));this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x2bb),()=>{const _0x56ec1a=_0x562a99;this[_0x56ec1a(0x23f)]();}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x22f),(_0x2cce55,_0x3472e1)=>{const _0x51a53c=_0x562a99;this[_0x51a53c(0x243)]({'userMessage':_0x3472e1});}),this[_0x562a99(0x21a)](_0x33c077,_0x562a99(0x1ab),(_0x24fffd,_0x2d6522)=>{const _0x3a5585=_0x562a99;this[_0x3a5585(0x25b)](_0x2d6522);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x1e3),()=>{const _0x1aa992=_0x562a99;_0x33c077[_0x1aa992(0x2b5)]();}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x1c5),async()=>{const _0xae4ead=_0x562a99;await this[_0xae4ead(0x2d4)](),await this[_0xae4ead(0x23a)](),this[_0xae4ead(0x176)]();}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x1dc),()=>{const _0x299916=_0x562a99;this[_0x299916(0x2cf)]?.[_0x299916(0x2a8)](_0xc3a8c(this[_0x299916(0x1c0)][_0x299916(0x248)],_0x299916(0x2bf)));}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x2ac),(_0xe52146,_0x2bb65c)=>{const _0x42bbe0=_0x562a99;this[_0x42bbe0(0x2cf)]?.[_0x42bbe0(0x29a)](Array[_0x42bbe0(0x2d2)](_0x2bb65c));}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x17c),(_0x196f40,_0x3b03b6)=>{const _0x686761=_0x562a99;this[_0x686761(0x2cf)]?.[_0x686761(0x17c)](_0x3b03b6);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x25e),(_0xceb38b,_0x3db746)=>{const _0x3bcf25=_0x562a99;this[_0x3bcf25(0x2cf)]?.[_0x3bcf25(0x25e)](_0x3db746[_0x3bcf25(0x24c)],_0x3db746[_0x3bcf25(0x1ba)]);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x245),(_0x221f5d,_0x1254ed)=>{const _0x216e5d=_0x562a99;this[_0x216e5d(0x183)](_0x1254ed);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x285),(_0x1e89e8,_0x1f684e)=>{const _0x351a07=_0x562a99;this[_0x351a07(0x2cf)]?.[_0x351a07(0x285)](_0x1f684e[_0x351a07(0x1c3)],_0x1f684e[_0x351a07(0x2a2)],_0x1f684e[_0x351a07(0x172)]);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x204),()=>{const _0x21efb3=_0x562a99;this[_0x21efb3(0x1db)]();}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x28c),()=>{const _0x2a1190=_0x562a99;this[_0x2a1190(0x29c)]();}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x209),(_0x41de71,_0x1a7e0f)=>{const _0x5ca3ea=_0x562a99;this[_0x5ca3ea(0x2cf)]?.[_0x5ca3ea(0x263)](_0x1a7e0f);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x18f),(_0x1d6d66,{replyId:_0x3c25b5})=>{const _0x46f076=_0x562a99;console[_0x46f076(0x25c)](_0x46f076(0x1a2),_0x3c25b5);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x18b),(_0xba9926,{replyId:_0x112551})=>{const _0x1c6633=_0x562a99;console[_0x1c6633(0x25c)](_0x1c6633(0x233),_0x112551);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x256),(_0xc6f27f,_0x44353e)=>{const _0x49f989=_0x562a99;this[_0x49f989(0x1c0)][_0x49f989(0x268)][_0x49f989(0x283)](_0x1641f1)[_0x49f989(0x220)](),this[_0x49f989(0x1d0)](_0x44353e);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x18c),(_0x5b56d4,{replyId:_0x20cb07,partIndex:_0x4d3b47})=>{const _0x46bdaf=_0x562a99;this[_0x46bdaf(0x1f7)]=this[_0x46bdaf(0x2d8)][_0x46bdaf(0x294)],this[_0x46bdaf(0x28f)](_0x20cb07,_0x4d3b47);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x246),(_0x3e8752,{replyId:_0x51346c,partIndex:_0x224542})=>{const _0x96a3d5=_0x562a99,_0x47a7e9=this[_0x96a3d5(0x1a1)](_0x51346c,_0x224542);_0x47a7e9&&_0x96a3d5(0x266)!=_0x47a7e9[_0x96a3d5(0x26d)][_0x96a3d5(0x1e8)][_0x96a3d5(0x1c8)]&&this[_0x96a3d5(0x2db)][_0x96a3d5(0x258)]([_0x47a7e9[_0x96a3d5(0x26d)]],_0x96a3d5(0x1e4));}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x2ba),()=>{const _0x5850d9=_0x562a99;this[_0x5850d9(0x2db)][_0x5850d9(0x257)](_0x5850d9(0x1e4));}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x1a6),(_0x4e2bfe,_0x57c5fd)=>{const _0x1df968=_0x562a99;this[_0x1df968(0x1c0)][_0x1df968(0x268)][_0x1df968(0x283)](_0x1641f1)[_0x1df968(0x220)](),this[_0x1df968(0x2a1)](_0x57c5fd);}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x21f),async(_0x15de9d,{replyId:_0x2a30e9,showDiff:_0x39461f})=>{const _0x3bba4f=_0x562a99,{reply:_0x53e104}=this[_0x3bba4f(0x250)](_0x2a30e9),_0x224e93=_0x53e104[_0x3bba4f(0x27a)]({'showDiff':_0x39461f});await this[_0x3bba4f(0x2d8)][_0x3bba4f(0x1a4)]({'id':_0x53e104['id'],'parts':_0x224e93,'renderingStrategy':_0x3bba4f(0x25f)});}),this[_0x562a99(0x21a)](this[_0x562a99(0x2d8)],_0x562a99(0x2af),(_0x5d8aca,{replyId:_0xfbf834,partIndex:_0x43b77b})=>{const _0x1a9f0a=_0x562a99;this[_0x1a9f0a(0x1ee)]?.[_0x1a9f0a(0x2c5)]==_0xfbf834&&this[_0x1a9f0a(0x1ee)]?.[_0x1a9f0a(0x2b2)]==_0x43b77b&&this[_0x1a9f0a(0x1c0)][_0x1a9f0a(0x268)][_0x1a9f0a(0x283)](_0x1641f1)[_0x1a9f0a(0x220)]();const {reply:_0x4d7847}=this[_0x1a9f0a(0x250)](_0xfbf834);_0x4d7847[_0x1a9f0a(0x22e)](_0x43b77b,_0x1a9f0a(0x1bf)),this[_0x1a9f0a(0x2db)][_0x1a9f0a(0x257)](_0x1a9f0a(0x1e4));});}async[_0x722d79(0x19a)](){const _0x113b5b=_0x722d79;this[_0x113b5b(0x1c0)]instanceof _0x223500?this[_0x113b5b(0x1ef)](this[_0x113b5b(0x1c0)]):this[_0x113b5b(0x21a)](this[_0x113b5b(0x1c0)][_0x113b5b(0x19b)],_0x113b5b(0x253),(_0x257e78,_0x36a987)=>{const _0x154bc5=_0x113b5b;_0x36a987['on'](_0x154bc5(0x1a7),()=>{const _0x350ace=_0x154bc5;this[_0x350ace(0x1ef)](_0x36a987);});}),await this[_0x113b5b(0x23f)]();}[_0x722d79(0x1d0)](_0x120439){const _0x115fdb=_0x722d79,_0x119257=_0x4dfe45(this[_0x115fdb(0x1c0)]);if(!_0x119257[_0x115fdb(0x268)][_0x115fdb(0x17d)](_0x115fdb(0x298)))throw new _0x56bfe4(_0x115fdb(0x202),null);const _0x1d075c=this[_0x115fdb(0x1c0)][_0x115fdb(0x268)][_0x115fdb(0x283)](_0x115fdb(0x201)),{reply:_0x2ab759,interaction:_0x3fd3ae}=this[_0x115fdb(0x250)](_0x120439[_0x115fdb(0x2c5)]),_0x1e94de=this[_0x115fdb(0x1a1)](_0x120439[_0x115fdb(0x2c5)],_0x120439[_0x115fdb(0x2b2)]),_0x4647d5=void 0x0!==_0x120439[_0x115fdb(0x2b2)]?[_0x2ab759[_0x115fdb(0x2a5)][_0x120439[_0x115fdb(0x2b2)]]]:_0x2ab759[_0x115fdb(0x2a5)][_0x115fdb(0x174)](_0x2ddad8=>_0x115fdb(0x2ca)==_0x2ddad8[_0x115fdb(0x251)]),_0x1ca4f4=_0x4647d5[_0x115fdb(0x196)](_0x4e5568=>_0x2ab759[_0x115fdb(0x2a5)][_0x115fdb(0x231)](_0x4e5568));if(!_0x1e94de||_0x115fdb(0x266)==_0x1e94de[_0x115fdb(0x26d)][_0x115fdb(0x1e8)][_0x115fdb(0x1c8)])return void _0x1ca4f4[_0x115fdb(0x267)](_0x13cbed=>_0x2ab759[_0x115fdb(0x22e)](_0x13cbed,_0x115fdb(0x261)));_0x1ca4f4[_0x115fdb(0x267)](_0x98b69d=>_0x2ab759[_0x115fdb(0x22e)](_0x98b69d,_0x115fdb(0x2a0)));const _0x2729ef=_0x3fe6({'editor':_0x119257,'reply':_0x2ab759,'interaction':_0x3fd3ae,'groups':_0x4647d5,'transform':!0x0,'documentCompare':_0x1d075c,'documentCompareOptions':{'anchor':_0x115fdb(0x1b3),'markDeletions':!0x0}});let _0x4b1225;_0x1e94de&&this[_0x115fdb(0x27c)](_0x1e94de[_0x115fdb(0x26d)]),_0x119257[_0x115fdb(0x219)][_0x115fdb(0x24d)](_0x2cbcf9=>{const _0x250b16=_0x115fdb;_0x4b1225=_0x2cbcf9[_0x250b16(0x2d1)],_0x119257[_0x250b16(0x268)][_0x250b16(0x283)](_0x250b16(0x25a))[_0x250b16(0x26f)](_0x2729ef),this[_0x250b16(0x2db)][_0x250b16(0x257)](_0x250b16(0x1e4));}),this[_0x115fdb(0x1c7)][_0x115fdb(0x254)](_0x4b1225,{'interactionId':_0x3fd3ae['id'],'replyId':_0x2ab759['id'],'indexes':_0x1ca4f4[_0x115fdb(0x2c9)]()}),this[_0x115fdb(0x199)](_0x2ab759);}[_0x722d79(0x2a1)](_0x2e02ac){const _0x3cb3c6=_0x722d79,_0x349d4e=_0x4dfe45(this[_0x3cb3c6(0x1c0)]),_0x1a9b89=this[_0x3cb3c6(0x1c0)][_0x3cb3c6(0x268)][_0x3cb3c6(0x283)](_0x1e0fe3),{reply:_0x5888e2,interaction:_0x1f1395}=this[_0x3cb3c6(0x250)](_0x2e02ac[_0x3cb3c6(0x2c5)]),_0x4695b5=this[_0x3cb3c6(0x1a1)](_0x2e02ac[_0x3cb3c6(0x2c5)],_0x2e02ac[_0x3cb3c6(0x2b2)]),_0x1fe6fa=void 0x0!==_0x2e02ac[_0x3cb3c6(0x2b2)]?[_0x5888e2[_0x3cb3c6(0x2a5)][_0x2e02ac[_0x3cb3c6(0x2b2)]]]:_0x5888e2[_0x3cb3c6(0x2a5)][_0x3cb3c6(0x174)](_0x5c678e=>_0x3cb3c6(0x2ca)==_0x5c678e[_0x3cb3c6(0x251)]),_0x58ac68=_0x1fe6fa[_0x3cb3c6(0x196)](_0x58efa6=>_0x5888e2[_0x3cb3c6(0x2a5)][_0x3cb3c6(0x231)](_0x58efa6));if(!_0x4695b5||_0x3cb3c6(0x266)==_0x4695b5[_0x3cb3c6(0x26d)][_0x3cb3c6(0x1e8)][_0x3cb3c6(0x1c8)])return void _0x58ac68[_0x3cb3c6(0x267)](_0x125de6=>_0x5888e2[_0x3cb3c6(0x22e)](_0x125de6,_0x3cb3c6(0x261)));_0x58ac68[_0x3cb3c6(0x267)](_0x1dd959=>_0x5888e2[_0x3cb3c6(0x22e)](_0x1dd959,_0x3cb3c6(0x2a0)));const _0x145ea3=_0x3fe6({'editor':_0x349d4e,'reply':_0x5888e2,'interaction':_0x1f1395,'groups':_0x1fe6fa,'transform':!0x0,'documentCompare':_0x1a9b89,'documentCompareOptions':{'anchor':_0x3cb3c6(0x1b3),'markDeletions':!0x1}});let _0x35a949;_0x4695b5&&this[_0x3cb3c6(0x27c)](_0x4695b5[_0x3cb3c6(0x26d)]),_0x349d4e[_0x3cb3c6(0x219)][_0x3cb3c6(0x24d)](_0x4255db=>{const _0x2dd27a=_0x3cb3c6;_0x35a949=_0x4255db[_0x2dd27a(0x2d1)];for(const _0x4e751b of _0x145ea3)_0x4e751b[_0x2dd27a(0x262)]=_0x349d4e[_0x2dd27a(0x219)][_0x2dd27a(0x1d2)][_0x2dd27a(0x1ca)],_0x316879(_0x349d4e,_0x4e751b),_0x4255db[_0x2dd27a(0x2d1)][_0x2dd27a(0x1fa)](_0x4e751b),_0x349d4e[_0x2dd27a(0x219)][_0x2dd27a(0x1f6)](_0x4e751b);}),this[_0x3cb3c6(0x1c7)][_0x3cb3c6(0x254)](_0x35a949,{'interactionId':_0x1f1395['id'],'replyId':_0x5888e2['id'],'indexes':_0x58ac68[_0x3cb3c6(0x2c9)]()}),this[_0x3cb3c6(0x199)](_0x5888e2);}[_0x722d79(0x28f)](_0x3f88e6,_0x258de5){const _0x282c6e=_0x722d79,_0x384b72=_0x4dfe45(this[_0x282c6e(0x1c0)]),_0x4dc653=this[_0x282c6e(0x1a1)](_0x3f88e6,_0x258de5),_0x1776cf=this[_0x282c6e(0x1c0)][_0x282c6e(0x268)][_0x282c6e(0x283)](_0x1641f1);if(!_0x4dc653)return void _0x1776cf[_0x282c6e(0x220)]();const {range:_0x301433,currentIndex:_0x217593}=_0x4dc653;if(_0x282c6e(0x266)==_0x301433[_0x282c6e(0x1e8)][_0x282c6e(0x1c8)]){const {reply:_0xcf96f0}=this[_0x282c6e(0x250)](_0x3f88e6);return _0xcf96f0[_0x282c6e(0x22e)](_0x217593,_0x282c6e(0x261)),void _0x1776cf[_0x282c6e(0x220)]();}if(this[_0x282c6e(0x1ee)]?.[_0x282c6e(0x2c5)]==_0x3f88e6&&this[_0x282c6e(0x1ee)]?.[_0x282c6e(0x2b2)]==_0x217593)return;this[_0x282c6e(0x1c9)](_0x1776cf),this[_0x282c6e(0x1ee)]={'replyId':_0x3f88e6,'partIndex':_0x217593};let _0x53d856=_0x384b72[_0x282c6e(0x2d9)][_0x282c6e(0x283)](_0x282c6e(0x17a))||[..._0xaf499c];_0x384b72[_0x282c6e(0x268)][_0x282c6e(0x17d)](_0x282c6e(0x298))||(_0x53d856=_0x53d856[_0x282c6e(0x174)](_0x23a86b=>_0x282c6e(0x256)!=_0x23a86b));const _0x45bddf=new _0x72ff3(_0x384b72[_0x282c6e(0x248)],{'showDiff':this[_0x282c6e(0x1f7)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x282c6e(0x21d)},'hideHeader':!0x0,'availableActions':_0x53d856});this[_0x282c6e(0x1c9)](_0x45bddf);const {reply:_0x175fa9}=this[_0x282c6e(0x250)](_0x3f88e6),_0x5379b3=_0x175fa9[_0x282c6e(0x27a)]({'showDiff':this[_0x282c6e(0x1f7)]})[_0x282c6e(0x174)](_0x456985=>_0x456985[_0x282c6e(0x2b6)]),_0x39d62f=_0x5379b3[_0x282c6e(0x28b)](_0x55e801=>_0x55e801[_0x282c6e(0x212)]==_0x217593);if(-0x1==_0x39d62f)return;const _0x5d358b=_0x5379b3[_0x39d62f],_0x2c5447=_0x5379b3['at']((_0x39d62f-0x1)%_0x5379b3[_0x282c6e(0x252)])?.[_0x282c6e(0x212)],_0x5231ac=_0x5379b3['at']((_0x39d62f+0x1)%_0x5379b3[_0x282c6e(0x252)])?.[_0x282c6e(0x212)];_0x45bddf[_0x282c6e(0x1d3)]({'parts':[_0x5d358b],'renderingStrategy':_0x282c6e(0x25f)});const _0x27df79=_0x217593!==_0x2c5447;this[_0x282c6e(0x27c)](_0x301433,!0x0),_0x1776cf[_0x282c6e(0x27f)]({'index':_0x217593,'title':_0xc3a8c(this[_0x282c6e(0x1c0)][_0x282c6e(0x248)],_0x282c6e(0x171),(_0x39d62f+0x1)[_0x282c6e(0x203)]()),'icon':_0x5c5b7c,'mainView':_0x45bddf,'showRotator':_0x27df79,'showApplyButton':!0x0,'showSuggestButton':_0x384b72[_0x282c6e(0x268)][_0x282c6e(0x17d)](_0x282c6e(0x298)),'ranges':[_0x301433]}),this[_0x282c6e(0x2d8)][_0x282c6e(0x1af)](_0x3f88e6,_0x217593),this[_0x282c6e(0x21a)](_0x45bddf,_0x282c6e(0x21f),(_0x2c5f82,{showDiff:_0x4237fc})=>{const _0x1db6aa=_0x282c6e;this[_0x1db6aa(0x1f7)]=_0x4237fc;const {reply:_0x5077a4}=this[_0x1db6aa(0x250)](_0x3f88e6),_0x470de3=_0x5077a4[_0x1db6aa(0x27a)]({'showDiff':_0x4237fc,'groupIndex':_0x217593});_0x45bddf[_0x1db6aa(0x1d3)]({'parts':_0x470de3,'renderingStrategy':_0x1db6aa(0x25f)});}),this[_0x282c6e(0x21a)](_0x1776cf,_0x282c6e(0x1a6),()=>{const _0xbf9042=_0x282c6e;this[_0xbf9042(0x2a1)]({'replyId':_0x3f88e6,'partIndex':_0x217593}),_0x27df79?this[_0xbf9042(0x28f)](_0x3f88e6,_0x5231ac):_0x1776cf[_0xbf9042(0x220)]();}),this[_0x282c6e(0x21a)](_0x1776cf,_0x282c6e(0x256),()=>{const _0x4e1213=_0x282c6e;this[_0x4e1213(0x1d0)]({'replyId':_0x3f88e6,'partIndex':_0x217593}),_0x27df79?this[_0x4e1213(0x28f)](_0x3f88e6,_0x5231ac):_0x1776cf[_0x4e1213(0x220)]();}),_0x27df79&&(this[_0x282c6e(0x21a)](_0x1776cf,_0x282c6e(0x1aa),()=>{const _0x3a78fe=_0x282c6e;this[_0x3a78fe(0x28f)](_0x3f88e6,_0x5231ac);}),this[_0x282c6e(0x21a)](_0x1776cf,_0x282c6e(0x2c7),()=>{const _0x2ac325=_0x282c6e;this[_0x2ac325(0x28f)](_0x3f88e6,_0x2c5447);})),this[_0x282c6e(0x21a)](_0x1776cf,_0x282c6e(0x1fd),()=>{const _0x1a8056=_0x282c6e;this[_0x1a8056(0x1c9)](_0x1776cf),this[_0x1a8056(0x1c9)](_0x45bddf),this[_0x1a8056(0x1ee)]=null;});}[_0x722d79(0x1a1)](_0x821076,_0x1cd73e){const _0x48e56f=_0x722d79,_0x4a9e87=_0x4dfe45(this[_0x48e56f(0x1c0)]),{reply:_0x2b5c54,interaction:_0x5b58b3}=this[_0x48e56f(0x250)](_0x821076),_0x3a5e49=_0x2b5c54[_0x48e56f(0x2a5)][_0x48e56f(0x174)](_0x3cf133=>_0x48e56f(0x2ca)==_0x3cf133[_0x48e56f(0x251)]),_0xad91b0=_0x3a5e49[_0x48e56f(0x196)](_0x3b6346=>_0x2b5c54[_0x48e56f(0x2a5)][_0x48e56f(0x231)](_0x3b6346));void 0x0===_0x1cd73e&&(_0x1cd73e=_0xad91b0[0x0]);const _0x3bd09e=_0xad91b0[_0x48e56f(0x231)](_0x1cd73e);if(-0x1==_0x3bd09e)return null;const _0x4ddd15=_0x3a5e49[_0x3bd09e],_0x44ce4d=new _0x301a4d([]),_0xc128dd=new _0x301a4d([]);for(const _0x570550 of _0x4ddd15[_0x48e56f(0x295)])if(_0x48e56f(0x2a9)!=_0x570550[_0x48e56f(0x184)]&&_0xc128dd[_0x48e56f(0x2a4)][_0x48e56f(0x221)](_0x570550[_0x48e56f(0x1d5)][_0x48e56f(0x2ad)](!0x0)),_0x48e56f(0x1da)!=_0x570550[_0x48e56f(0x184)]){const _0x4781c7=_0x5c46b8(_0x2bd938=>_0x174d3e(_0x2bd938,_0x48e56f(0x20b))==_0x570550['id'],_0x2b5c54[_0x48e56f(0x188)],!0x0);_0x44ce4d[_0x48e56f(0x2a4)][_0x48e56f(0x221)](_0x4781c7[_0x48e56f(0x2ad)](!0x0));}if(0x0==_0x44ce4d[_0x48e56f(0x2a4)][_0x48e56f(0x252)]){if(_0x4ddd15[_0x48e56f(0x295)][0x0][_0x48e56f(0x186)]){const _0x15a1ab=_0x244b7e(_0x48e56f(0x20b),_0x4ddd15[_0x48e56f(0x295)][0x0][_0x48e56f(0x186)],_0x2b5c54[_0x48e56f(0x188)]);_0x44ce4d[_0x48e56f(0x2a4)][_0x48e56f(0x217)](_0x15a1ab[_0x48e56f(0x2ad)](!0x0)),_0xc128dd[_0x48e56f(0x2a4)][_0x48e56f(0x217)](_0x15a1ab[_0x48e56f(0x2ad)](!0x0)),_0x15a1ab[_0x48e56f(0x1ce)]&&(_0x44ce4d[_0x48e56f(0x2a4)][_0x48e56f(0x221)](_0x15a1ab[_0x48e56f(0x1ce)][_0x48e56f(0x2ad)](!0x0)),_0xc128dd[_0x48e56f(0x2a4)][_0x48e56f(0x221)](_0x15a1ab[_0x48e56f(0x1ce)][_0x48e56f(0x2ad)](!0x0)));}else{const _0x5ec94f=_0x2b5c54[_0x48e56f(0x188)][_0x48e56f(0x2a4)][0x0];if(!_0x5ec94f)return null;_0x44ce4d[_0x48e56f(0x2a4)][_0x48e56f(0x221)](_0x5ec94f[_0x48e56f(0x2ad)](!0x0)),_0xc128dd[_0x48e56f(0x2a4)][_0x48e56f(0x221)](_0x5ec94f[_0x48e56f(0x2ad)](!0x0));}}const _0x12867d=_0x5b58b3[_0x48e56f(0x265)](),_0xc8b9f4=_0x4a9e87[_0x48e56f(0x2a6)][_0x48e56f(0x2b1)](_0x12867d[_0x48e56f(0x28a)]),_0x273056=_0x9af624(_0x44ce4d),_0x413ccf=_0x4a9e87[_0x48e56f(0x2a6)][_0x48e56f(0x2b1)](_0x273056),_0x435523=_0x4a9e87[_0x48e56f(0x2a6)][_0x48e56f(0x2b1)](_0x273056),_0x45746b=_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x1be)](_0x413ccf,0x0),_0x2c3460=_0x9af624(_0xc128dd),_0xf683da={'anchor':_0x45746b,'markDeletions':!0x1},_0x498a0e=_0x4a9e87[_0x48e56f(0x268)][_0x48e56f(0x283)](_0x1e0fe3)[_0x48e56f(0x1a8)](_0x273056,_0x2c3460,_0xf683da)[_0x48e56f(0x187)]();if(!_0x498a0e[_0x48e56f(0x252)])return null;_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x24d)](_0x4bb215=>{const _0x4121e8=_0x48e56f;for(const _0x5045a9 of _0x498a0e)if(_0x4121e8(0x194)==_0x5045a9[_0x4121e8(0x184)]){const _0x3c84a7=_0x5045a9[_0x4121e8(0x2aa)],_0x5b1183=_0x5045a9[_0x4121e8(0x17f)],_0x3a1810=new _0x347c6f(_0x3c84a7,_0x5b1183);_0x4bb215[_0x4121e8(0x2d1)][_0x4121e8(0x1fa)](_0x3a1810),_0x4a9e87[_0x4121e8(0x219)][_0x4121e8(0x1f6)](_0x3a1810);}else _0x4121e8(0x22b)!==_0x5045a9[_0x4121e8(0x184)]&&(_0x5045a9[_0x4121e8(0x262)]=null,_0x5045a9[_0x4121e8(0x1fc)]=!0x1,_0x4bb215[_0x4121e8(0x2d1)][_0x4121e8(0x1fa)](_0x5045a9),_0x4a9e87[_0x4121e8(0x219)][_0x4121e8(0x1f6)](_0x5045a9));});const _0x5143cc=_0x136d73(_0x4a9e87,_0x498a0e,_0x413ccf);_0x118718(_0x4a9e87[_0x48e56f(0x219)],_0x5143cc);const _0x5bfd41=_0x5143cc[_0x48e56f(0x297)]()[_0x48e56f(0x1c6)][_0x48e56f(0x2bc)][_0x48e56f(0x2c9)](),_0x11f23a=_0x5143cc[_0x48e56f(0x297)]()[_0x48e56f(0x208)][_0x48e56f(0x2bc)][_0x48e56f(0x2c9)](),_0x42563c=[];let _0x581d4d=_0x413ccf,_0x5ca588=_0x435523;for(let _0x9196c4=0x0;_0x9196c4<_0x11f23a[_0x48e56f(0x252)];_0x9196c4++){const _0x53abcb=_0x581d4d[_0x48e56f(0x281)]-_0x11f23a[_0x9196c4];_0x42563c[_0x9196c4]=_0x5ca588[_0x48e56f(0x281)]-_0x53abcb,_0x581d4d=_0x581d4d[_0x48e56f(0x1f8)](_0x11f23a[_0x9196c4]),_0x5ca588=_0x5ca588[_0x48e56f(0x1f8)](_0x42563c[_0x9196c4]);}const _0x4bc16b=_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x1a3)](_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x259)](_0x435523,_0x5bfd41),_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x259)](_0x435523,_0x42563c)),_0x589a70=_0x435523[_0x48e56f(0x27e)](0x0)[_0x48e56f(0x1ea)](_0x47a7f5),_0x4a2b4d=Array[_0x48e56f(0x2d2)](_0xc8b9f4[_0x48e56f(0x197)]())[_0x48e56f(0x2c2)](_0x46d76f=>_0x46d76f[_0x48e56f(0x1ea)](_0x47a7f5)==_0x589a70)[_0x48e56f(0x2cb)](),_0x5abb3f=_0x4bc16b[_0x48e56f(0x1c6)][_0x48e56f(0x2bc)][_0x48e56f(0x2c9)](),_0x182e3e=_0x4bc16b[_0x48e56f(0x208)][_0x48e56f(0x2bc)][_0x48e56f(0x2c9)]();_0x5abb3f[0x0]=_0x4a2b4d[0x0]+_0x5abb3f[0x0],_0x182e3e[0x0]=_0x4a2b4d[0x0]+_0x182e3e[0x0];let _0x46b3c4=_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x1a3)](_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x259)](_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x1d2)][_0x48e56f(0x2da)](),_0x5abb3f),_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x259)](_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x1d2)][_0x48e56f(0x2da)](),_0x182e3e));const _0x52fe54=_0x4a9e87[_0x48e56f(0x219)][_0x48e56f(0x1d2)][_0x48e56f(0x240)][_0x48e56f(0x187)](_0x12867d[_0x48e56f(0x1ca)]);for(const _0x31df42 of _0x52fe54)_0x46b3c4=_0x419998[_0x48e56f(0x237)](_0x46b3c4[_0x48e56f(0x1ed)](_0x31df42));return{'range':_0x46b3c4,'currentIndex':_0x1cd73e};}[_0x722d79(0x1ef)](_0x2ad5c2){const _0x696c87=_0x722d79;if(!_0x2ad5c2[_0x696c87(0x268)][_0x696c87(0x17d)](_0x696c87(0x206)))return;const _0x3a3d81=_0x2ad5c2[_0x696c87(0x226)][_0x696c87(0x283)](_0x696c87(0x270)),_0x1fdfce=_0x2ad5c2[_0x696c87(0x226)][_0x696c87(0x283)](_0x696c87(0x291));this[_0x696c87(0x21a)](_0x3a3d81,_0x696c87(0x192),(_0x16ab0d,_0x1202d6,_0x2dfe7e)=>{const _0x3e5fb4=_0x696c87,_0x489e4a=this[_0x3e5fb4(0x1c7)][_0x3e5fb4(0x283)](_0x1202d6);if(!_0x489e4a)return;const _0x18dcab=this[_0x3e5fb4(0x2cf)][_0x3e5fb4(0x29f)](_0x489e4a[_0x3e5fb4(0x274)])[_0x3e5fb4(0x1cc)](_0x489e4a[_0x3e5fb4(0x2c5)]);_0x489e4a[_0x3e5fb4(0x229)][_0x3e5fb4(0x267)](_0x35536b=>_0x18dcab[_0x3e5fb4(0x22e)](_0x35536b,_0x3e5fb4(0x2ca))),this[_0x3e5fb4(0x1c7)][_0x3e5fb4(0x234)](_0x1202d6),this[_0x3e5fb4(0x1c7)][_0x3e5fb4(0x254)](_0x2dfe7e,_0x489e4a);}),this[_0x696c87(0x21a)](_0x1fdfce,_0x696c87(0x192),(_0x17ec5e,_0x262c7b,_0x3c468d)=>{const _0x269c32=_0x696c87,_0x124478=this[_0x269c32(0x1c7)][_0x269c32(0x283)](_0x262c7b);if(!_0x124478)return;const _0x43a86b=this[_0x269c32(0x2cf)][_0x269c32(0x29f)](_0x124478[_0x269c32(0x274)])[_0x269c32(0x1cc)](_0x124478[_0x269c32(0x2c5)]);_0x124478[_0x269c32(0x229)][_0x269c32(0x267)](_0x23e2b7=>_0x43a86b[_0x269c32(0x22e)](_0x23e2b7,_0x269c32(0x2a0))),this[_0x269c32(0x1c7)][_0x269c32(0x234)](_0x262c7b),this[_0x269c32(0x1c7)][_0x269c32(0x254)](_0x3c468d,_0x124478);});}async[_0x722d79(0x271)](_0x2ceff9){const _0x52fb31=_0x722d79;this[_0x52fb31(0x1c0)][_0x52fb31(0x268)][_0x52fb31(0x283)](_0x1641f1)[_0x52fb31(0x220)](),this[_0x52fb31(0x2d8)][_0x52fb31(0x2d6)](_0x52fb31(0x25f)),this[_0x52fb31(0x2d8)][_0x52fb31(0x282)](!0x0),await this[_0x52fb31(0x2d4)]();try{await this[_0x52fb31(0x1e1)][_0x52fb31(0x24f)](_0x2ceff9)[_0x52fb31(0x16e)](),await this[_0x52fb31(0x23f)](_0x2ceff9),this[_0x52fb31(0x24b)]('\x20');const {sessionId:_0x57161d}=this[_0x52fb31(0x2db)][_0x52fb31(0x18e)]();await this[_0x52fb31(0x2cf)][_0x52fb31(0x29b)](_0x2ceff9,_0x57161d),this[_0x52fb31(0x2cf)][_0x52fb31(0x228)]()&&this[_0x52fb31(0x2cf)][_0x52fb31(0x2a8)](_0xc3a8c(this[_0x52fb31(0x1c0)][_0x52fb31(0x248)],_0x52fb31(0x2bf)));}catch(_0x8f46ee){this[_0x52fb31(0x2d8)][_0x52fb31(0x296)]({'errorMessage':_0xc3a8c(this[_0x52fb31(0x1c0)][_0x52fb31(0x248)],_0x52fb31(0x1ff)),'id':_0x2ceff9}),this[_0x52fb31(0x198)](new _0x56bfe4(_0x52fb31(0x1e9),this,{'error':_0x8f46ee}));}finally{this[_0x52fb31(0x1c0)][_0x52fb31(0x268)][_0x52fb31(0x283)](_0x15b59e)[_0x52fb31(0x205)][_0x52fb31(0x222)](_0x52fb31(0x1f5)),this[_0x52fb31(0x2d8)][_0x52fb31(0x223)](),this[_0x52fb31(0x2d8)][_0x52fb31(0x2d6)](_0x52fb31(0x286)),this[_0x52fb31(0x2d8)][_0x52fb31(0x282)](!0x1);}}[_0x722d79(0x280)](_0x532ab0){const _0x3161ec=_0x722d79;this[_0x3161ec(0x2cf)]['id']===_0x532ab0&&this[_0x3161ec(0x23f)]();}async[_0x722d79(0x1c4)](){const _0x4994d4=_0x722d79,_0x14b5f5=this[_0x4994d4(0x2db)][_0x4994d4(0x207)]();this[_0x4994d4(0x2cf)]?.[_0x4994d4(0x260)](_0x14b5f5),this[_0x4994d4(0x2cf)]?.[_0x4994d4(0x2a8)](_0xc3a8c(this[_0x4994d4(0x1c0)][_0x4994d4(0x248)],_0x4994d4(0x2bf)));}[_0x722d79(0x176)](){const _0x53bbac=_0x722d79;this[_0x53bbac(0x2cf)]?.[_0x53bbac(0x292)]();}[_0x722d79(0x17b)](){const _0x4ee3c5=_0x722d79;this[_0x4ee3c5(0x2d8)][_0x4ee3c5(0x17b)]();}async[_0x722d79(0x2bb)](){const _0x56ec38=_0x722d79;await this[_0x56ec38(0x23f)]();}async[_0x722d79(0x22a)]({message:_0x17fbb5,quickActionData:_0x3d2618}){const _0x4203f3=_0x722d79;await this[_0x4203f3(0x243)]({'userMessage':_0x17fbb5,'quickActionData':_0x3d2618});}[_0x722d79(0x1a5)](){const _0x159ef0=_0x722d79,_0x45ba49=this[_0x159ef0(0x1c0)][_0x159ef0(0x2d9)][_0x159ef0(0x283)](_0x159ef0(0x178));if(!_0x45ba49)throw new _0x56bfe4(_0x159ef0(0x22c),this);return _0x45ba49;}async[_0x722d79(0x23f)](_0x2becc3){const _0xae89b7=_0x722d79;try{this[_0xae89b7(0x2d8)][_0xae89b7(0x287)](),await this[_0xae89b7(0x1e2)](_0x2becc3);}catch(_0x529e8a){this[_0xae89b7(0x2d8)][_0xae89b7(0x296)]({'errorMessage':_0xc3a8c(this[_0xae89b7(0x1c0)][_0xae89b7(0x248)],_0xae89b7(0x236)),'id':_0x2becc3||_0x567464()}),console[_0xae89b7(0x27b)](_0x529e8a),this[_0xae89b7(0x2cf)]=void 0x0,this[_0xae89b7(0x2d8)][_0xae89b7(0x21b)]();}}async[_0x722d79(0x1e2)](_0x3c06d5){const _0x4d62d8=_0x722d79,_0x5cdb87=this[_0x4d62d8(0x1c0)][_0x4d62d8(0x268)][_0x4d62d8(0x283)](_0x1641f1);let _0x358ce5;_0x5cdb87[_0x4d62d8(0x1f2)]&&_0x5cdb87[_0x4d62d8(0x220)](),_0x3c06d5||!this[_0x4d62d8(0x2cf)]?_0x358ce5=this[_0x4d62d8(0x1c0)][_0x4d62d8(0x2d9)][_0x4d62d8(0x283)](_0x4d62d8(0x1a0)):this[_0x4d62d8(0x2d8)][_0x4d62d8(0x225)]&&(_0x358ce5=this[_0x4d62d8(0x2cf)][_0x4d62d8(0x2c6)]['id']),await this[_0x4d62d8(0x2d4)]();const _0x288bae=this[_0x4d62d8(0x1a5)](),_0xd58aad=_0x3c06d5||_0x567464();this[_0x4d62d8(0x2cf)]=new _0x5188f9({'connector':this[_0x4d62d8(0x1e1)],'chatModels':this[_0x4d62d8(0x2d7)],'selectedModelId':_0x358ce5,'conversationId':_0xd58aad,'group':_0x288bae,'getEditor':()=>_0x4dfe45(this[_0x4d62d8(0x1c0)])}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x26a),(_0x285196,_0x3f819e)=>{const _0x197386=_0x4d62d8;this[_0x197386(0x2d8)][_0x197386(0x269)](_0x3f819e),this[_0x197386(0x2d8)][_0x197386(0x1e6)](),this[_0x197386(0x2d8)][_0x197386(0x18d)](),this[_0x197386(0x2d8)][_0x197386(0x185)](),_0x3c06d5||(this[_0x197386(0x2d8)][_0x197386(0x278)](),this[_0x197386(0x2cf)]?.[_0x197386(0x2a8)](_0xc3a8c(this[_0x197386(0x1c0)][_0x197386(0x248)],_0x197386(0x2bf))));}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x290),(_0x2d303e,_0x1cc6aa)=>{const _0x1d0a67=_0x4d62d8;this[_0x1d0a67(0x2d8)][_0x1d0a67(0x2d5)](_0x1cc6aa[_0x1d0a67(0x1ac)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x239),(_0xd36c16,_0x5e69bc)=>{const _0x267bb3=_0x4d62d8;this[_0x267bb3(0x2d8)][_0x267bb3(0x1cd)](_0x5e69bc);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x279),()=>{const _0x4be888=_0x4d62d8;this[_0x4be888(0x2d8)][_0x4be888(0x1ad)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1d4),()=>{const _0x1ef360=_0x4d62d8;this[_0x1ef360(0x2d8)][_0x1ef360(0x1ad)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x26b),(_0x5bdf12,_0x391539)=>{const _0x3a4bde=_0x4d62d8;this[_0x3a4bde(0x2d8)][_0x3a4bde(0x1d9)](_0x391539,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1c2),(_0x1d5d69,_0x5e2852)=>{const _0x3917b8=_0x4d62d8;this[_0x3917b8(0x2d8)][_0x3917b8(0x1d9)](_0x5e2852,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x191),()=>{const _0x3a0744=_0x4d62d8;this[_0x3a0744(0x2d8)][_0x3a0744(0x17e)]();}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x20e),async()=>{const _0x4c1c27=_0x4d62d8;await this[_0x4c1c27(0x2d8)][_0x4c1c27(0x28d)]();}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1fb),(_0x233241,_0x30f8c2)=>{const _0x42be1f=_0x4d62d8;this[_0x42be1f(0x2d8)][_0x42be1f(0x18a)](_0x30f8c2['id']);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1bd),(_0x39e732,_0x28e810,_0x57efc6)=>{const _0x5b1781=_0x4d62d8;this[_0x5b1781(0x24b)](_0x28e810,_0x57efc6);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x284),(_0x593f27,_0x97793e)=>{const _0xe15472=_0x4d62d8;_0xe15472(0x24a)===_0x97793e[_0xe15472(0x184)]?this[_0xe15472(0x2d8)][_0xe15472(0x1dd)](_0x97793e):this[_0xe15472(0x2d8)][_0xe15472(0x1b1)](_0x97793e);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1e5),async(_0x54a1c4,_0x41488a)=>{const _0x17bed8=_0x4d62d8;await this[_0x17bed8(0x235)]({'reply':_0x41488a});}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x2d0),(_0x4c36b2,{reply:_0x5289f5,index:_0x388256,state:_0x545549})=>{const _0x53faec=_0x4d62d8;this[_0x53faec(0x2d8)][_0x53faec(0x2b8)]({'id':_0x5289f5['id'],'index':_0x388256,'state':_0x545549});}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1d7),(_0x231bf8,_0x2ef5a0)=>{const _0x320339=_0x4d62d8;if(this[_0x320339(0x2d8)][_0x320339(0x179)](_0x2ef5a0[_0x320339(0x1d6)],_0x2ef5a0[_0x320339(0x1f0)]),_0x320339(0x2c3)===_0x2ef5a0[_0x320339(0x1d6)][_0x320339(0x184)]){const _0x3599b=[..._0x4dfe45(this[_0x320339(0x1c0)])[_0x320339(0x219)][_0x320339(0x1d2)][_0x320339(0x2c3)][_0x320339(0x23d)]()];this[_0x320339(0x2db)][_0x320339(0x258)](_0x3599b,_0x320339(0x299)+this[_0x320339(0x2cf)]?.['id']);}}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x23e),(_0x874a2e,_0x126e1b)=>{const _0x4ab692=_0x4d62d8;this[_0x4ab692(0x2d8)][_0x4ab692(0x245)](_0x126e1b[_0x4ab692(0x1b2)]),_0x4ab692(0x182)==_0x126e1b[_0x4ab692(0x1b2)]&&this[_0x4ab692(0x176)](),_0x4ab692(0x2c3)===_0x126e1b[_0x4ab692(0x184)]&&this[_0x4ab692(0x2db)][_0x4ab692(0x257)](_0x4ab692(0x299)+this[_0x4ab692(0x2cf)]?.['id']);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x2c4),(_0x5a76ec,_0x38d602)=>{const _0x142ad3=_0x4d62d8;this[_0x142ad3(0x2d8)][_0x142ad3(0x247)](_0x38d602[_0x142ad3(0x1d6)][_0x142ad3(0x1b2)],_0x38d602[_0x142ad3(0x1f0)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x224),(_0xd267ae,_0x2fcb30)=>{const _0x465554=_0x4d62d8;this[_0x465554(0x2d8)][_0x465554(0x2b7)](_0x2fcb30[_0x465554(0x1d1)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x22d),(_0xf7c780,_0x2809c3)=>{const _0x3dee0c=_0x4d62d8;this[_0x3dee0c(0x2d8)][_0x3dee0c(0x2b0)](_0x2809c3[_0x3dee0c(0x241)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x1b0),(_0x18f45e,_0x5e63aa)=>{const _0x5e3b0b=_0x4d62d8;this[_0x5e3b0b(0x2d8)][_0x5e3b0b(0x175)](_0x5e63aa[_0x5e3b0b(0x1c3)],_0x5e63aa[_0x5e3b0b(0x24c)],_0x5e63aa[_0x5e3b0b(0x2cd)],_0x5e63aa[_0x5e3b0b(0x172)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x213),(_0x9a7b4f,_0x56780a)=>{const _0x1d8af9=_0x4d62d8;this[_0x1d8af9(0x2d8)][_0x1d8af9(0x244)](_0x56780a[_0x1d8af9(0x1c3)],_0x56780a[_0x1d8af9(0x2c1)],_0x56780a[_0x1d8af9(0x2b4)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x26e),(_0x2a574d,_0x1f8f6c)=>{const _0x443196=_0x4d62d8;this[_0x443196(0x2d8)][_0x443196(0x1bc)](_0x1f8f6c);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x275),(_0x2ebfb1,_0x2a6562)=>{const _0x535438=_0x4d62d8;this[_0x535438(0x2d8)][_0x535438(0x216)](_0x2a6562[_0x535438(0x2c6)],_0x2a6562[_0x535438(0x289)]);}),this[_0x4d62d8(0x2cf)]['on'](_0x4d62d8(0x27b),(_0x4df066,{error:_0x4ab6f6,interactionId:_0x44e184,fileName:_0x2ca375,url:_0x168999,sourceId:_0x23afe0,sourceLabel:_0x21ed11})=>{const _0xa8bc5e=_0x4d62d8,_0x476423=_0x44e184?_0x44e184+':'+_0x567464():_0x567464();_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x1cf))?this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x28e)]({'staticMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x230)),'id':_0x476423}):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x1f1))||_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x1fe))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x236)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x273))?this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x29d),_0x2ca375),'id':_0x476423}):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x16f))?this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x1b4),_0x168999),'id':_0x476423}):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x1de))?this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x1e7)),'id':_0x476423}):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x2c8))?this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x2a7)),'id':_0x476423}):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x189))?(_0x23afe0&&this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x1eb)](_0x23afe0),this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x249),_0x21ed11||_0xa8bc5e(0x24c)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x1f4))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x1f9)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x20a))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x180)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x227))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x211)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x24e))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x2ab)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x1ae))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x21c)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):_0x4ab6f6[_0xa8bc5e(0x173)][_0xa8bc5e(0x218)](_0xa8bc5e(0x232))?(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x2bd)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6)):(this[_0xa8bc5e(0x2d8)][_0xa8bc5e(0x296)]({'errorMessage':_0xc3a8c(this[_0xa8bc5e(0x1c0)][_0xa8bc5e(0x248)],_0xa8bc5e(0x238)),'id':_0x476423}),this[_0xa8bc5e(0x198)](_0x4ab6f6));}),await this[_0x4d62d8(0x2cf)][_0x4d62d8(0x276)](this[_0x4d62d8(0x1c0)][_0x4d62d8(0x2d9)][_0x4d62d8(0x283)](_0x4d62d8(0x27d))),_0x3c06d5||await this[_0x4d62d8(0x2cf)][_0x4d62d8(0x1c6)]();}async[_0x722d79(0x243)]({userMessage:_0x3dce6e,quickActionData:_0x192eca}){const _0x189823=_0x722d79;if(!this[_0x189823(0x2cf)])throw new _0x56bfe4(_0x189823(0x255));this[_0x189823(0x2cf)][_0x189823(0x1ec)]()&&await this[_0x189823(0x2cf)][_0x189823(0x1d8)](this[_0x189823(0x2db)][_0x189823(0x18e)]()),this[_0x189823(0x2cf)]['id']&&this[_0x189823(0x2cf)][_0x189823(0x1b8)]&&await this[_0x189823(0x2cf)][_0x189823(0x193)]({'userMessage':_0x3dce6e,'quickActionData':_0x192eca}),this[_0x189823(0x1cb)]();}[_0x722d79(0x1cb)](){const _0x273841=_0x722d79,_0x37e2d3=_0x4dfe45(this[_0x273841(0x1c0)])[_0x273841(0x219)],_0x51b00b=Array[_0x273841(0x2d2)](_0x37e2d3[_0x273841(0x1df)][_0x273841(0x2ae)](_0x5dc995));_0x37e2d3[_0x273841(0x24d)](_0x5e9259=>{const _0x385e72=_0x273841;_0x51b00b[_0x385e72(0x267)](_0x22f235=>_0x5e9259[_0x385e72(0x19d)](_0x22f235));});}[_0x722d79(0x23c)](){const _0x1c210a=_0x722d79;console[_0x1c210a(0x25c)](_0x1c210a(0x25d));}[_0x722d79(0x25b)](_0x391aa8){const _0x47a1a4=_0x722d79;this[_0x47a1a4(0x2d8)][_0x47a1a4(0x214)](_0x391aa8);}[_0x722d79(0x198)](_0x581436){const _0x16f589=_0x722d79;_0x403c82(_0x581436[_0x16f589(0x173)]);}[_0x722d79(0x183)](_0x6ac715){const _0x7bcc6e=_0x722d79;this[_0x7bcc6e(0x2cf)]?.[_0x7bcc6e(0x277)](_0x6ac715);}[_0x722d79(0x1db)](){const _0x4a3b01=_0x722d79;this[_0x4a3b01(0x2cf)]?.[_0x4a3b01(0x204)]();}[_0x722d79(0x29c)](){const _0xd70395=_0x722d79;this[_0xd70395(0x2cf)]?.[_0xd70395(0x28c)]();}[_0x722d79(0x250)](_0x494b92){const _0x439c1f=_0x722d79,[_0x16df74,_0x3e227f]=_0x494b92[_0x439c1f(0x190)](':'),_0x529875=this[_0x439c1f(0x2cf)][_0x439c1f(0x29f)](_0x16df74),_0x56b986=_0x529875[_0x439c1f(0x1cc)](_0x3e227f);return{'interaction':_0x529875,'reply':_0x56b986};}[_0x722d79(0x27c)](_0x559926,_0x323829=!0x1){const _0x157b72=_0x722d79,_0x24885d=_0x4dfe45(this[_0x157b72(0x1c0)]),_0x347750={'target':_0x24885d[_0x157b72(0x242)][_0x157b72(0x205)][_0x157b72(0x2b3)][_0x157b72(0x20d)](_0x24885d[_0x157b72(0x242)][_0x157b72(0x1c1)][_0x157b72(0x29e)](_0x559926)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x323829};_0x323829&&(_0x347750[_0x157b72(0x215)]=!0x0),_0x2ac001(_0x347750);}[_0x722d79(0x24b)](_0x1b1057,_0x4546f7=!0x1){const _0x503f90=_0x722d79;this[_0x503f90(0x2d8)][_0x503f90(0x1bd)](_0x1b1057||_0xc3a8c(this[_0x503f90(0x1c0)][_0x503f90(0x248)],_0x503f90(0x272)),_0x4546f7);}async[_0x722d79(0x235)]({reply:_0xed8c28,renderingStrategy:_0x56fe87}){const _0x227434=_0x722d79,{id:_0x3b0f36,isDone:_0x274593,type:_0x1476d9,parsedContent:_0x1fc6ef}=_0xed8c28;if(_0x227434(0x2b9)===_0x1476d9){const _0x575f0b=_0xed8c28[_0x227434(0x27a)]({'showDiff':this[_0x227434(0x2d8)][_0x227434(0x294)]});await this[_0x227434(0x2d8)][_0x227434(0x1a4)]({'id':_0x3b0f36,'parts':_0x575f0b,'renderingStrategy':_0x56fe87,'isDone':_0x274593});}else _0x227434(0x24a)===_0x1476d9&&await this[_0x227434(0x2d8)][_0x227434(0x1bb)]({'id':_0x3b0f36,'parsedContent':_0x1fc6ef,'renderingStrategy':_0x56fe87,'isDone':_0x274593});_0x274593&&_0xed8c28[_0x227434(0x181)][_0x227434(0x252)]>0x0&&this[_0x227434(0x2d8)][_0x227434(0x1f3)](_0x3b0f36,_0xed8c28[_0x227434(0x181)]);}async[_0x722d79(0x2d4)](){const _0xb7df21=_0x722d79,_0x5c52d2=this[_0xb7df21(0x2cf)]?.[_0xb7df21(0x293)];_0x5c52d2&&(_0x5c52d2[_0xb7df21(0x1b7)](),this[_0xb7df21(0x2d8)][_0xb7df21(0x288)](_0x5c52d2));}async[_0x722d79(0x23a)](){const _0x4f0751=_0x722d79,_0x5c737c=this[_0x4f0751(0x2cf)]?.[_0x4f0751(0x293)];if(_0x5c737c){for await(const _0x54df9e of _0x5c737c[_0x4f0751(0x2be)])await this[_0x4f0751(0x235)]({'reply':_0x54df9e,'renderingStrategy':_0x4f0751(0x25f)});}}[_0x722d79(0x199)](_0x2c7197){const _0x4626d0=_0x722d79,_0x403d95={'positiveCount':_0x2c7197[_0x4626d0(0x2a5)][_0x4626d0(0x174)](_0x5147ee=>_0x4626d0(0x2a0)===_0x5147ee[_0x4626d0(0x251)])[_0x4626d0(0x252)],'totalCount':_0x2c7197[_0x4626d0(0x2a5)][_0x4626d0(0x252)],'modificationId':_0x2c7197['id']},_0x5810e2=this[_0x4626d0(0x2cf)][_0x4626d0(0x29f)](_0x2c7197[_0x4626d0(0x274)])[_0x4626d0(0x1e0)];this[_0x4626d0(0x1e1)][_0x4626d0(0x1b6)](this[_0x4626d0(0x2cf)]['id'],_0x5810e2,_0x403d95);}}
|
|
23
|
+
const _0xf7bdc8=_0x2f7d;function _0x2f7d(_0x231b9e,_0x46d1e2){const _0x4829c5=_0x4829();return _0x2f7d=function(_0x2f7d67,_0x338f95){_0x2f7d67=_0x2f7d67-0x15f;let _0x226b14=_0x4829c5[_0x2f7d67];return _0x226b14;},_0x2f7d(_0x231b9e,_0x46d1e2);}(function(_0x130ca5,_0x5ddc64){const _0x53a765=_0x2f7d,_0x17c463=_0x130ca5();while(!![]){try{const _0x4e861d=-parseInt(_0x53a765(0x23a))/0x1*(-parseInt(_0x53a765(0x28e))/0x2)+-parseInt(_0x53a765(0x19c))/0x3*(-parseInt(_0x53a765(0x2bd))/0x4)+-parseInt(_0x53a765(0x1d4))/0x5+-parseInt(_0x53a765(0x22f))/0x6*(parseInt(_0x53a765(0x1b7))/0x7)+-parseInt(_0x53a765(0x283))/0x8*(-parseInt(_0x53a765(0x21a))/0x9)+-parseInt(_0x53a765(0x1c9))/0xa+-parseInt(_0x53a765(0x23e))/0xb*(parseInt(_0x53a765(0x18b))/0xc);if(_0x4e861d===_0x5ddc64)break;else _0x17c463['push'](_0x17c463['shift']());}catch(_0x59a475){_0x17c463['push'](_0x17c463['shift']());}}}(_0x4829,0x54da7));import{ContextPlugin as _0x168ff1,Editor as _0x2b4142}from'ckeditor5/src/core.js';import{CKEditorError as _0x217c5a,logError as _0x39c475,scrollViewportToShowTarget as _0x145ff8,uid as _0x532b26}from'ckeditor5/src/utils.js';import{AIConnector as _0xb0fd74}from'../aicore/aiconnector.js';import{AITabs as _0x4f4427}from'../aitabs/aitabs.js';import{AIChatConversation as _0x208493}from'./model/aichatconversation.js';import{getTranslation as _0x5f46ca}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3ca273}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x419f44}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3dfc6a}from'./model/aichatmodels.js';import{getEditorFromContext as _0x554683}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x53c37e,DATA_ID_MODEL_ATTRIBUTE as _0x230da6}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x5bcc09,getOperationsFromReply as _0x54130d}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x2ca72d,getMinimalSelection as _0x5be61d}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0xcfb78,_DetachOperation as _0x1a206a}from'ckeditor5/src/engine.js';import{findOne as _0x262c1,getAttribute as _0x3e07fb,serialize as _0x1c4235,Document as _0x48ab8a,findByAttribute as _0x405389}from'../aicore/utils/htmlparser.js';import{IconAI as _0x477ad5}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x5e7af4}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x20014a}from'../aiballoon/aiballoon.js';function _0x4829(){const _0xdb6dd3=['AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','_aiChatUi','addFeedItemAIReply','uiId','contextItemAdded','_toggleWebSearch','ai-chat-conversation-not-found','batch','updateCurrentDocumentInContext','loadConversation','isDisabled','pluginName','undo','_toggleReasoning','change','resourceStateChanged','addFeedItemStaticMessage','version','ai-chat-context-unsupported-type','getConversation','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','interactionDestroyed','root','replyId','sendMessage','commands','_applyOperationsAsSuggestions','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','listenTo','getMarkersGroup','_updateReplyContent','setIsUploadInProgress','contextItems','ai-chat-controller-mouse-over','isModelAvailable','error','get','unshift','2685684wIzNaV','add','set','messageId','capabilitiesUpdated','_flushLastInteractionUI','reasoningFinished','removeSelectionFromChatContext','AIChatUI','setConversationTitle','ai-chat-context-unsupported-file-type','text-delta','_aiEditing','collaboration.channelId','setChangeGroupState','removeFromContext','showFakeVisualSelection','init','ai-chat-invalid-request','getInteractionAndReplyById','closeSourceResourceBalloon','path','editing','interactionCreated','webSearchStarted','ai-chat-conversation-start-failed','ai-chat-controller-no-active-conversation','interactionStarted','setModel','context','_applySuggestion','contextItemRemoved','data','addSelectionToContext','mouseLeaveSuggestion','_getDocumentRangeForReplyChanges','findIndex','revert','query','startConversation','ready','getAttribute','getChild','isInContext','getTransformedByOperation','abortPromptStream','data-id','DocumentCompare','rootName','type','AI_CHAT_RESOURCE_LOAD_FAILED','dislike','editors','updateContent','sendUserMessage','AI_CHAT_INVALID_REQUEST','getPath','mapper','replyChangeGroupStateUpdated','ai-chat-resource-load-failed','5604aaPoWT','AIChatController','close','Showing\x20conversation\x20history...','cloneNode','addFeedInteractionHeader','toString','addFilesToContext','like','start','indexes','has','_handleStartConversation','isPremiumPlugin','modelSelected','outdated','isCurrentDocumentInContext','3YVtFjw','_removeAISelectionMarkers','toggleSuggestionDisplayMode','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','resizedTabs','pending','ai-chat-url-upload-failed','ai.chat.context','isOfficialPlugin','split','getOperations','scrollFeedToSuggestion','nextSibling','_removeFromContext','_integrateEditor','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','_showConversationHistory','resourceId','addResourceToContext','conversationInitialized','getChildAtOffset','getDocumentContext','domConverter','addContextOptionsChanged','delete','addFeedItemError','_scrollToSuggestionRange','1467445pqYIAV','dialogClosed','addFeedItemUserMessage','toggleReasoning','ai-chat-file-upload-failed','selectedModel','ai-chat-context-invalid-data','mouseOverSuggestion','updateFeedItemAIReplyContent','getReply','webSearchFinished','options','addFeedItemAISuggestion','state','setAddContextOptions','contextSent','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','resetMessageInput','366320wsoFKP','stopInteraction','enableControls','AI_CHAT_UNTITLED_CONVERSATION','fetchConversation','sourcePosition','documentContextContent','updateFeedItemAIReplySuggestionContent','updateFeedItemAIReplySources','changeGroups','end','3105085ysHzqN','showPrevious','find','isLoading','hasChanges','forEach','_createFromRanges','toggleLoadingSkeleton','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','sources','new','log','AIEditing','ai-chat-context-file-too-many-pages','applyOperation','maxOffset','push','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai.chat.models.displayedModels','ai-chat-conversation-init-failed','_openBalloonFor','from','uid','removeMarker','stopListening','hideFakeVisualSelection','Undo','_insertSuggestion','setFeedItemRenderingStrategy','load','addFileToContext','interactionId','showDiff','startInteraction','handleUserInteraction','isOpen','locale','ai-no-track-changes','resetConversationTitle','loadSourceResources','reasoningStarted','requires','focusPromptInput','node','setLoadingMessage','ai.chat.models.defaultModelId','ai.availableReplyActions','content','baseVersion','addCurrentDocumentToContext','insertSuggestion','addOperation','full','interactionFinished','stop','AI_CHAT_GENERIC_ERROR','handleRemovedConversation','isCurrentDocumentInConversation','AIConnector','ai-chat-context-file-too-large','removed','createPositionAt','contextItemLoadingEnded','view','getGroupId','selection','Liked\x20response','getRoot','range','addSelectionToChatContext','446031GaKKDa','getDiff','resize','upsertAIChatRating','AI_CHAT_ABORTED_MESSAGE','replies','model','AI_CHAT_CONTEXT_FILE_TOO_LARGE','chat','sourceId','index','Disliked\x20response','filter','AI_BALLOON_HEADER_TITLE','startAutoScroll','accepted','activeConversation','activateTab','populateSourceResourceBalloon','markers','isDocumentOperation','6OkOMxw','resource','streaming','slice','selectModel','source','viewRangeToDom','addUrlToContext','document','getRanges','getSelectionText','19QziyxW','AI_CHAT_UNABLE_TO_START_CONVERSATION','removeSelectionFromContext','setIsMaximized','3014PKFlTH','changes','static','ai-chat-missing-channel-id','contextItem','ai-request-aborted','removeContextItem','updateCapabilities','rejectSuggestion','_setIsMaximized','clearPendingContextUI','rejected','_updateRatings','lastInteraction','_balloonShowDiff','AI_CHAT_CONTEXT_INVALID_DATA','plugins','getInteraction','TrackChanges','TrackChangesEditing','startsWith','_startConversationSafely','uploadProgressChanged','setConversationContext','$graveyard','alignToTop','sourceResourcesLoaded','applySuggestion','_logError','config','createPositionFromPath','_handleUIUserMessage','remove','ai-conversation-','setContextItemLoading','message','afterInit','howMany','replyContentUpdated','redo','isUploadInProgress','partIndex','_batchToChanges','finishInteraction','length','showNext','ai-chat-context-form-data-size-limits-exceeded','parse','updateResourceState','updateFeedItemAIReplySuggestionPartState','_aiChatModels','disableControls','_stopLastInteraction','_previewedChangeGroup','resources','ai-chat-source-resources-load-failed','open','showChangeInText','clearConversationContextUI','anchorId','createRange','marker','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','map','toggleWebSearch','updateConversationTitle','getDocumentData','replyCreated','_aiConnector','104YnMgCe','getFirstRange','setSelectedModel','isStarted','addContextItem','resizeTabs','addDocumentToContext','indexOf','getContentParts','createConversation','current-document','2854RmgUUu','children','history','main','toViewRange','AITabs','getChildren','modification-delta','removeFeedInteraction'];_0x4829=function(){return _0xdb6dd3;};return _0x4829();}export class AIChatController extends _0x168ff1{[_0xf7bdc8(0x2c9)];[_0xf7bdc8(0x282)];[_0xf7bdc8(0x298)];[_0xf7bdc8(0x270)];[_0xf7bdc8(0x268)]=new Map();[_0xf7bdc8(0x273)]=null;[_0xf7bdc8(0x24c)]=!0x1;static get[_0xf7bdc8(0x1fd)](){return[_0xb0fd74,_0x20014a,_0x53c37e];}static get[_0xf7bdc8(0x2a2)](){const _0x27835a=_0xf7bdc8;return _0x27835a(0x18c);}static get[_0xf7bdc8(0x1a4)](){return!0x0;}static get[_0xf7bdc8(0x198)](){return!0x0;}[_0xf7bdc8(0x160)](){const _0x40425e=_0xf7bdc8;this[_0x40425e(0x282)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x20e)),this[_0x40425e(0x298)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x2c5)),this[_0x40425e(0x2c9)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x1e0)),this[_0x40425e(0x270)]=new _0x3dfc6a({'connector':this[_0x40425e(0x282)],'availableModels':this[_0x40425e(0x16c)][_0x40425e(0x25b)][_0x40425e(0x2bb)](_0x40425e(0x1e6)),'defaultModelId':this[_0x40425e(0x16c)][_0x40425e(0x25b)][_0x40425e(0x2bb)](_0x40425e(0x201))});const _0x31cb75=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x293));this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x176),()=>{const _0x3e0953=_0x40425e;this[_0x3e0953(0x253)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x185),(_0x443bcb,_0x51c2ab)=>{const _0x36592e=_0x40425e;this[_0x36592e(0x25d)]({'userMessage':_0x51c2ab});}),this[_0x40425e(0x2b3)](_0x31cb75,_0x40425e(0x1a0),(_0x25d2be,_0x4867b2)=>{const _0x31a7bf=_0x40425e;this[_0x31a7bf(0x247)](_0x4867b2);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x288),()=>{const _0x23a4cb=_0x40425e;_0x31cb75[_0x23a4cb(0x21c)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x17c),async()=>{const _0x3d96c9=_0x40425e;await this[_0x3d96c9(0x272)](),await this[_0x3d96c9(0x2c2)](),this[_0x3d96c9(0x2c4)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x289),()=>{const _0x4ad5bc=_0x40425e;this[_0x4ad5bc(0x22a)]?.[_0x4ad5bc(0x205)](_0x5f46ca(this[_0x4ad5bc(0x16c)][_0x4ad5bc(0x1f8)],_0x4ad5bc(0x2b2)));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1f2),(_0x432a20,_0x433c44)=>{const _0x306cc0=_0x40425e;this[_0x306cc0(0x22a)]?.[_0x306cc0(0x192)](Array[_0x306cc0(0x1e9)](_0x433c44));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x236),(_0x4a8e29,_0x188bc8)=>{const _0x29c4a7=_0x40425e;this[_0x29c4a7(0x22a)]?.[_0x29c4a7(0x236)](_0x188bc8);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1ae),(_0x5f07db,_0x1ef83e)=>{const _0x50f9ae=_0x40425e;this[_0x50f9ae(0x22a)]?.[_0x50f9ae(0x1ae)](_0x1ef83e[_0x50f9ae(0x234)],_0x1ef83e[_0x50f9ae(0x230)]);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x244),(_0x4db313,_0x19b71c)=>{const _0x4c9a44=_0x40425e;this[_0x4c9a44(0x1a9)](_0x19b71c);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1fb),(_0x291351,_0x33b6e8)=>{const _0xe0c88d=_0x40425e;this[_0xe0c88d(0x22a)]?.[_0xe0c88d(0x1fb)](_0x33b6e8[_0xe0c88d(0x223)],_0x33b6e8[_0xe0c88d(0x175)],_0x33b6e8[_0xe0c88d(0x1ea)]);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x27e),()=>{const _0x134267=_0x40425e;this[_0x134267(0x29c)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1ba),()=>{const _0x2a4198=_0x40425e;this[_0x2a4198(0x2a4)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x233),(_0x4d8233,_0x10e86b)=>{const _0x2b2fa2=_0x40425e;this[_0x2b2fa2(0x22a)]?.[_0x2b2fa2(0x16b)](_0x10e86b);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x193),(_0x3163bb,{replyId:_0x2f3fde})=>{const _0x23fa59=_0x40425e;console[_0x23fa59(0x1df)](_0x23fa59(0x216),_0x2f3fde);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x182),(_0x596c95,{replyId:_0x19c6ab})=>{const _0x52c3b7=_0x40425e;console[_0x52c3b7(0x1df)](_0x52c3b7(0x225),_0x19c6ab);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x206),(_0x2028dd,_0x49e962)=>{const _0x31b91a=_0x40425e;this[_0x31b91a(0x16c)][_0x31b91a(0x24e)][_0x31b91a(0x2bb)](_0x20014a)[_0x31b91a(0x18d)](),this[_0x31b91a(0x1ef)](_0x49e962);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x277),(_0x1f5639,{replyId:_0x79e92,partIndex:_0x10f622})=>{const _0x36f926=_0x40425e;this[_0x36f926(0x24c)]=this[_0x36f926(0x298)][_0x36f926(0x1f4)],this[_0x36f926(0x1e8)](_0x79e92,_0x10f622);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1be),(_0x44d469,{replyId:_0x3e9e86,partIndex:_0x143161})=>{const _0x276152=_0x40425e,_0x377b75=this[_0x276152(0x172)](_0x3e9e86,_0x143161);_0x377b75&&_0x276152(0x256)!=_0x377b75[_0x276152(0x218)][_0x276152(0x2ad)][_0x276152(0x17f)]&&this[_0x276152(0x2c9)][_0x276152(0x15f)]([_0x377b75[_0x276152(0x218)]],_0x276152(0x2b8));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x171),()=>{const _0x175111=_0x40425e;this[_0x175111(0x2c9)][_0x175111(0x1ed)](_0x175111(0x2b8));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x259),(_0x25bcb3,_0x5e9ec1)=>{const _0xdd2829=_0x40425e;this[_0xdd2829(0x16c)][_0xdd2829(0x24e)][_0xdd2829(0x2bb)](_0x20014a)[_0xdd2829(0x18d)](),this[_0xdd2829(0x16d)](_0x5e9ec1);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x19e),async(_0x597aa7,{replyId:_0x4de7a2,showDiff:_0xbe4734})=>{const _0x40dce3=_0x40425e,{reply:_0x520494}=this[_0x40dce3(0x162)](_0x4de7a2),_0x1f83a5=_0x520494[_0x40dce3(0x28b)]({'showDiff':_0xbe4734});await this[_0x40dce3(0x298)][_0x40dce3(0x1d0)]({'id':_0x520494['id'],'parts':_0x1f83a5,'renderingStrategy':_0x40dce3(0x240)});}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x246),(_0xce23f4,{replyId:_0x2368d2,partIndex:_0x5cd4c8})=>{const _0x20ae8b=_0x40425e;this[_0x20ae8b(0x273)]?.[_0x20ae8b(0x2ae)]==_0x2368d2&&this[_0x20ae8b(0x273)]?.[_0x20ae8b(0x267)]==_0x5cd4c8&&this[_0x20ae8b(0x16c)][_0x20ae8b(0x24e)][_0x20ae8b(0x2bb)](_0x20014a)[_0x20ae8b(0x18d)]();const {reply:_0x4be6ae}=this[_0x20ae8b(0x162)](_0x2368d2);_0x4be6ae[_0x20ae8b(0x2cb)](_0x5cd4c8,_0x20ae8b(0x249)),this[_0x20ae8b(0x2c9)][_0x20ae8b(0x1ed)](_0x20ae8b(0x2b8));});}async[_0xf7bdc8(0x262)](){const _0x4de10e=_0xf7bdc8;this[_0x4de10e(0x16c)]instanceof _0x2b4142?this[_0x4de10e(0x1aa)](this[_0x4de10e(0x16c)]):this[_0x4de10e(0x2b3)](this[_0x4de10e(0x16c)][_0x4de10e(0x183)],_0x4de10e(0x2be),(_0x283729,_0x5c2713)=>{const _0x3ee492=_0x4de10e;_0x5c2713['on'](_0x3ee492(0x177),()=>{const _0x17df2f=_0x3ee492;this[_0x17df2f(0x1aa)](_0x5c2713);});}),await this[_0x4de10e(0x253)]();}[_0xf7bdc8(0x1ef)](_0x64cceb){const _0x270dc8=_0xf7bdc8,_0x492d5b=_0x554683(this[_0x270dc8(0x16c)]);if(!_0x492d5b[_0x270dc8(0x24e)][_0x270dc8(0x196)](_0x270dc8(0x250)))throw new _0x217c5a(_0x270dc8(0x1f9),null);const _0x503cdc=this[_0x270dc8(0x16c)][_0x270dc8(0x24e)][_0x270dc8(0x2bb)](_0x270dc8(0x17e)),{reply:_0x23aa7f,interaction:_0x3550b5}=this[_0x270dc8(0x162)](_0x64cceb[_0x270dc8(0x2ae)]),_0x569668=this[_0x270dc8(0x172)](_0x64cceb[_0x270dc8(0x2ae)],_0x64cceb[_0x270dc8(0x267)]),_0x31f34c=void 0x0!==_0x64cceb[_0x270dc8(0x267)]?[_0x23aa7f[_0x270dc8(0x1d2)][_0x64cceb[_0x270dc8(0x267)]]]:_0x23aa7f[_0x270dc8(0x1d2)][_0x270dc8(0x226)](_0x26576f=>_0x270dc8(0x1a1)==_0x26576f[_0x270dc8(0x1c4)]),_0x5825e0=_0x31f34c[_0x270dc8(0x27d)](_0x5c27bb=>_0x23aa7f[_0x270dc8(0x1d2)][_0x270dc8(0x28a)](_0x5c27bb));if(!_0x569668||_0x270dc8(0x256)==_0x569668[_0x270dc8(0x218)][_0x270dc8(0x2ad)][_0x270dc8(0x17f)])return void _0x5825e0[_0x270dc8(0x1d9)](_0x5de2ed=>_0x23aa7f[_0x270dc8(0x2cb)](_0x5de2ed,_0x270dc8(0x19a)));_0x5825e0[_0x270dc8(0x1d9)](_0x501186=>_0x23aa7f[_0x270dc8(0x2cb)](_0x501186,_0x270dc8(0x229)));const _0x477936=_0x54130d({'editor':_0x492d5b,'reply':_0x23aa7f,'interaction':_0x3550b5,'groups':_0x31f34c,'transform':!0x0,'documentCompare':_0x503cdc,'documentCompareOptions':{'anchor':_0x270dc8(0x291),'markDeletions':!0x0}});let _0x4528a9;_0x569668&&this[_0x270dc8(0x1b6)](_0x569668[_0x270dc8(0x218)]),_0x492d5b[_0x270dc8(0x220)][_0x270dc8(0x2a5)](_0x33c84f=>{const _0x5af810=_0x270dc8;_0x4528a9=_0x33c84f[_0x5af810(0x29e)],_0x492d5b[_0x5af810(0x24e)][_0x5af810(0x2bb)](_0x5af810(0x251))[_0x5af810(0x2b1)](_0x477936),this[_0x5af810(0x2c9)][_0x5af810(0x1ed)](_0x5af810(0x2b8));}),this[_0x270dc8(0x268)][_0x270dc8(0x2bf)](_0x4528a9,{'interactionId':_0x3550b5['id'],'replyId':_0x23aa7f['id'],'indexes':_0x5825e0[_0x270dc8(0x232)]()}),this[_0x270dc8(0x24a)](_0x23aa7f);}[_0xf7bdc8(0x16d)](_0x29ee8d){const _0x411cac=_0xf7bdc8,_0x1efa7f=_0x554683(this[_0x411cac(0x16c)]),_0x3c2284=this[_0x411cac(0x16c)][_0x411cac(0x24e)][_0x411cac(0x2bb)](_0x53c37e),{reply:_0x255b7d,interaction:_0x5716ec}=this[_0x411cac(0x162)](_0x29ee8d[_0x411cac(0x2ae)]),_0xb53f89=this[_0x411cac(0x172)](_0x29ee8d[_0x411cac(0x2ae)],_0x29ee8d[_0x411cac(0x267)]),_0x1a8296=void 0x0!==_0x29ee8d[_0x411cac(0x267)]?[_0x255b7d[_0x411cac(0x1d2)][_0x29ee8d[_0x411cac(0x267)]]]:_0x255b7d[_0x411cac(0x1d2)][_0x411cac(0x226)](_0x3290bb=>_0x411cac(0x1a1)==_0x3290bb[_0x411cac(0x1c4)]),_0x23010a=_0x1a8296[_0x411cac(0x27d)](_0xd6adb1=>_0x255b7d[_0x411cac(0x1d2)][_0x411cac(0x28a)](_0xd6adb1));if(!_0xb53f89||_0x411cac(0x256)==_0xb53f89[_0x411cac(0x218)][_0x411cac(0x2ad)][_0x411cac(0x17f)])return void _0x23010a[_0x411cac(0x1d9)](_0x3032c9=>_0x255b7d[_0x411cac(0x2cb)](_0x3032c9,_0x411cac(0x19a)));_0x23010a[_0x411cac(0x1d9)](_0x2f45cd=>_0x255b7d[_0x411cac(0x2cb)](_0x2f45cd,_0x411cac(0x229)));const _0x473d6e=_0x54130d({'editor':_0x1efa7f,'reply':_0x255b7d,'interaction':_0x5716ec,'groups':_0x1a8296,'transform':!0x0,'documentCompare':_0x3c2284,'documentCompareOptions':{'anchor':_0x411cac(0x291),'markDeletions':!0x1}});let _0x2b9ed1;_0xb53f89&&this[_0x411cac(0x1b6)](_0xb53f89[_0x411cac(0x218)]),_0x1efa7f[_0x411cac(0x220)][_0x411cac(0x2a5)](_0x29ee19=>{const _0x5b305d=_0x411cac;_0x2b9ed1=_0x29ee19[_0x5b305d(0x29e)];for(const _0x386b54 of _0x473d6e)_0x386b54[_0x5b305d(0x204)]=_0x1efa7f[_0x5b305d(0x220)][_0x5b305d(0x237)][_0x5b305d(0x2a8)],_0x5bcc09(_0x1efa7f,_0x386b54),_0x29ee19[_0x5b305d(0x29e)][_0x5b305d(0x207)](_0x386b54),_0x1efa7f[_0x5b305d(0x220)][_0x5b305d(0x1e2)](_0x386b54);}),this[_0x411cac(0x268)][_0x411cac(0x2bf)](_0x2b9ed1,{'interactionId':_0x5716ec['id'],'replyId':_0x255b7d['id'],'indexes':_0x23010a[_0x411cac(0x232)]()}),this[_0x411cac(0x24a)](_0x255b7d);}[_0xf7bdc8(0x1e8)](_0x12e38d,_0x15b42c){const _0x522b72=_0xf7bdc8,_0x16d57f=_0x554683(this[_0x522b72(0x16c)]),_0xcd3514=this[_0x522b72(0x172)](_0x12e38d,_0x15b42c),_0x3d966a=this[_0x522b72(0x16c)][_0x522b72(0x24e)][_0x522b72(0x2bb)](_0x20014a);if(!_0xcd3514)return void _0x3d966a[_0x522b72(0x18d)]();const {range:_0xceeead,currentIndex:_0x1e57f5}=_0xcd3514;if(_0x522b72(0x256)==_0xceeead[_0x522b72(0x2ad)][_0x522b72(0x17f)]){const {reply:_0x1fcfad}=this[_0x522b72(0x162)](_0x12e38d);return _0x1fcfad[_0x522b72(0x2cb)](_0x1e57f5,_0x522b72(0x19a)),void _0x3d966a[_0x522b72(0x18d)]();}if(this[_0x522b72(0x273)]?.[_0x522b72(0x2ae)]==_0x12e38d&&this[_0x522b72(0x273)]?.[_0x522b72(0x267)]==_0x1e57f5)return;this[_0x522b72(0x1ec)](_0x3d966a),this[_0x522b72(0x273)]={'replyId':_0x12e38d,'partIndex':_0x1e57f5};let _0x423c1e=_0x16d57f[_0x522b72(0x25b)][_0x522b72(0x2bb)](_0x522b72(0x202))||[..._0x419f44];_0x16d57f[_0x522b72(0x24e)][_0x522b72(0x196)](_0x522b72(0x250))||(_0x423c1e=_0x423c1e[_0x522b72(0x226)](_0x35a382=>_0x522b72(0x206)!=_0x35a382));const _0x385af0=new _0x5e7af4(_0x16d57f[_0x522b72(0x1f8)],{'showDiff':this[_0x522b72(0x24c)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x522b72(0x208)},'hideHeader':!0x0,'availableActions':_0x423c1e});this[_0x522b72(0x1ec)](_0x385af0);const {reply:_0x531f66}=this[_0x522b72(0x162)](_0x12e38d),_0x4fb353=_0x531f66[_0x522b72(0x28b)]({'showDiff':this[_0x522b72(0x24c)]})[_0x522b72(0x226)](_0x1f3964=>_0x1f3964[_0x522b72(0x1d8)]),_0x10cf03=_0x4fb353[_0x522b72(0x173)](_0x81aee7=>_0x81aee7[_0x522b72(0x224)]==_0x1e57f5);if(-0x1==_0x10cf03)return;const _0x478b07=_0x4fb353[_0x10cf03],_0x4214fb=_0x4fb353['at']((_0x10cf03-0x1)%_0x4fb353[_0x522b72(0x26a)])?.[_0x522b72(0x224)],_0x5a07cb=_0x4fb353['at']((_0x10cf03+0x1)%_0x4fb353[_0x522b72(0x26a)])?.[_0x522b72(0x224)];_0x385af0[_0x522b72(0x184)]({'parts':[_0x478b07],'renderingStrategy':_0x522b72(0x240)});const _0x2b5ba0=_0x1e57f5!==_0x4214fb;this[_0x522b72(0x1b6)](_0xceeead,!0x0),_0x3d966a[_0x522b72(0x276)]({'index':_0x1e57f5,'title':_0x5f46ca(this[_0x522b72(0x16c)][_0x522b72(0x1f8)],_0x522b72(0x227),(_0x10cf03+0x1)[_0x522b72(0x191)]()),'icon':_0x477ad5,'mainView':_0x385af0,'showRotator':_0x2b5ba0,'showApplyButton':!0x0,'showSuggestButton':_0x16d57f[_0x522b72(0x24e)][_0x522b72(0x196)](_0x522b72(0x250)),'ranges':[_0xceeead]}),this[_0x522b72(0x298)][_0x522b72(0x1a7)](_0x12e38d,_0x1e57f5),this[_0x522b72(0x2b3)](_0x385af0,_0x522b72(0x19e),(_0x5f9c0f,{showDiff:_0x5351b9})=>{const _0x2e2fbb=_0x522b72;this[_0x2e2fbb(0x24c)]=_0x5351b9;const {reply:_0x59c3d9}=this[_0x2e2fbb(0x162)](_0x12e38d),_0x51e380=_0x59c3d9[_0x2e2fbb(0x28b)]({'showDiff':_0x5351b9,'groupIndex':_0x1e57f5});_0x385af0[_0x2e2fbb(0x184)]({'parts':_0x51e380,'renderingStrategy':_0x2e2fbb(0x240)});}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x259),()=>{const _0x1da485=_0x522b72;this[_0x1da485(0x16d)]({'replyId':_0x12e38d,'partIndex':_0x1e57f5}),_0x2b5ba0?this[_0x1da485(0x1e8)](_0x12e38d,_0x5a07cb):_0x3d966a[_0x1da485(0x18d)]();}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x206),()=>{const _0x2a616f=_0x522b72;this[_0x2a616f(0x1ef)]({'replyId':_0x12e38d,'partIndex':_0x1e57f5}),_0x2b5ba0?this[_0x2a616f(0x1e8)](_0x12e38d,_0x5a07cb):_0x3d966a[_0x2a616f(0x18d)]();}),_0x2b5ba0&&(this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x26b),()=>{const _0x17a609=_0x522b72;this[_0x17a609(0x1e8)](_0x12e38d,_0x5a07cb);}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x1d5),()=>{const _0x358df5=_0x522b72;this[_0x358df5(0x1e8)](_0x12e38d,_0x4214fb);})),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x1b8),()=>{const _0xdc7636=_0x522b72;this[_0xdc7636(0x1ec)](_0x3d966a),this[_0xdc7636(0x1ec)](_0x385af0),this[_0xdc7636(0x273)]=null;});}[_0xf7bdc8(0x172)](_0x5b4f33,_0x331d55){const _0x569878=_0xf7bdc8,_0x3c6494=_0x554683(this[_0x569878(0x16c)]),{reply:_0x17dba8,interaction:_0x2186ca}=this[_0x569878(0x162)](_0x5b4f33),_0x2fd60f=_0x17dba8[_0x569878(0x1d2)][_0x569878(0x226)](_0x5eaa2a=>_0x569878(0x1a1)==_0x5eaa2a[_0x569878(0x1c4)]),_0xd17896=_0x2fd60f[_0x569878(0x27d)](_0x306013=>_0x17dba8[_0x569878(0x1d2)][_0x569878(0x28a)](_0x306013));void 0x0===_0x331d55&&(_0x331d55=_0xd17896[0x0]);const _0x438754=_0xd17896[_0x569878(0x28a)](_0x331d55);if(-0x1==_0x438754)return null;const _0x502beb=_0x2fd60f[_0x438754],_0x23ef95=new _0x48ab8a([]),_0x468f51=new _0x48ab8a([]);for(const _0x588745 of _0x502beb[_0x569878(0x23f)])if(_0x569878(0x210)!=_0x588745[_0x569878(0x180)]&&_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0x588745[_0x569878(0x1ff)][_0x569878(0x18f)](!0x0)),_0x569878(0x1de)!=_0x588745[_0x569878(0x180)]){const _0x51c81c=_0x262c1(_0x146710=>_0x3e07fb(_0x146710,_0x569878(0x17d))==_0x588745['id'],_0x17dba8[_0x569878(0x1cf)],!0x0);_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0x51c81c[_0x569878(0x18f)](!0x0));}if(0x0==_0x23ef95[_0x569878(0x28f)][_0x569878(0x26a)]){if(_0x502beb[_0x569878(0x23f)][0x0][_0x569878(0x279)]){const _0x17bc4f=_0x405389(_0x569878(0x17d),_0x502beb[_0x569878(0x23f)][0x0][_0x569878(0x279)],_0x17dba8[_0x569878(0x1cf)]);_0x23ef95[_0x569878(0x28f)][_0x569878(0x2bc)](_0x17bc4f[_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x2bc)](_0x17bc4f[_0x569878(0x18f)](!0x0)),_0x17bc4f[_0x569878(0x1a8)]&&(_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0x17bc4f[_0x569878(0x1a8)][_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0x17bc4f[_0x569878(0x1a8)][_0x569878(0x18f)](!0x0)));}else{const _0xd5e2de=_0x17dba8[_0x569878(0x1cf)][_0x569878(0x28f)][0x0];if(!_0xd5e2de)return null;_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0xd5e2de[_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0xd5e2de[_0x569878(0x18f)](!0x0));}}const _0x1c14b0=_0x2186ca[_0x569878(0x1b1)](),_0x3ded59=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x1c14b0[_0x569878(0x203)]),_0x4c0ae6=_0x1c4235(_0x23ef95),_0x4e0bd5=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x4c0ae6),_0x5e7703=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x4c0ae6),_0xf8fb84=_0x3c6494[_0x569878(0x220)][_0x569878(0x211)](_0x4e0bd5,0x0),_0x506981=_0x1c4235(_0x468f51),_0x5859e7={'anchor':_0xf8fb84,'markDeletions':!0x1},_0x1b9bc5=_0x3c6494[_0x569878(0x24e)][_0x569878(0x2bb)](_0x53c37e)[_0x569878(0x21b)](_0x4c0ae6,_0x506981,_0x5859e7)[_0x569878(0x1a6)]();if(!_0x1b9bc5[_0x569878(0x26a)])return null;_0x3c6494[_0x569878(0x220)][_0x569878(0x2a5)](_0x2e914c=>{const _0x239106=_0x569878;for(const _0x23584a of _0x1b9bc5)if(_0x239106(0x25e)==_0x23584a[_0x239106(0x180)]){const _0x31bafe=_0x23584a[_0x239106(0x1ce)],_0x26a13a=_0x23584a[_0x239106(0x263)],_0xa4e81a=new _0x1a206a(_0x31bafe,_0x26a13a);_0x2e914c[_0x239106(0x29e)][_0x239106(0x207)](_0xa4e81a),_0x3c6494[_0x239106(0x220)][_0x239106(0x1e2)](_0xa4e81a);}else _0x239106(0x27b)!==_0x23584a[_0x239106(0x180)]&&(_0x23584a[_0x239106(0x204)]=null,_0x23584a[_0x239106(0x22e)]=!0x1,_0x2e914c[_0x239106(0x29e)][_0x239106(0x207)](_0x23584a),_0x3c6494[_0x239106(0x220)][_0x239106(0x1e2)](_0x23584a));});const _0x1dab38=_0x5be61d(_0x3c6494,_0x1b9bc5,_0x4e0bd5);_0x2ca72d(_0x3c6494[_0x569878(0x220)],_0x1dab38);const _0x380359=_0x1dab38[_0x569878(0x284)]()[_0x569878(0x194)][_0x569878(0x164)][_0x569878(0x232)](),_0x3ecb8a=_0x1dab38[_0x569878(0x284)]()[_0x569878(0x1d3)][_0x569878(0x164)][_0x569878(0x232)](),_0x279f64=[];let _0x44002f=_0x4e0bd5,_0x41c6dd=_0x5e7703;for(let _0x3bdc16=0x0;_0x3bdc16<_0x3ecb8a[_0x569878(0x26a)];_0x3bdc16++){const _0xee5f4d=_0x44002f[_0x569878(0x1e3)]-_0x3ecb8a[_0x3bdc16];_0x279f64[_0x3bdc16]=_0x41c6dd[_0x569878(0x1e3)]-_0xee5f4d,_0x44002f=_0x44002f[_0x569878(0x1b0)](_0x3ecb8a[_0x3bdc16]),_0x41c6dd=_0x41c6dd[_0x569878(0x1b0)](_0x279f64[_0x3bdc16]);}const _0x30850e=_0x3c6494[_0x569878(0x220)][_0x569878(0x27a)](_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x5e7703,_0x380359),_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x5e7703,_0x279f64)),_0x46ca75=_0x5e7703[_0x569878(0x179)](0x0)[_0x569878(0x178)](_0x230da6),_0x32caf8=Array[_0x569878(0x1e9)](_0x3ded59[_0x569878(0x294)]())[_0x569878(0x1d6)](_0x3549b5=>_0x3549b5[_0x569878(0x178)](_0x230da6)==_0x46ca75)[_0x569878(0x187)](),_0x58496c=_0x30850e[_0x569878(0x194)][_0x569878(0x164)][_0x569878(0x232)](),_0x194d67=_0x30850e[_0x569878(0x1d3)][_0x569878(0x164)][_0x569878(0x232)]();_0x58496c[0x0]=_0x32caf8[0x0]+_0x58496c[0x0],_0x194d67[0x0]=_0x32caf8[0x0]+_0x194d67[0x0];let _0x41f700=_0x3c6494[_0x569878(0x220)][_0x569878(0x27a)](_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x217)](),_0x58496c),_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x217)](),_0x194d67));const _0x4a1f5e=_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x290)][_0x569878(0x1a6)](_0x1c14b0[_0x569878(0x2a8)]);for(const _0xcdf7f8 of _0x4a1f5e)_0x41f700=_0xcfb78[_0x569878(0x1da)](_0x41f700[_0x569878(0x17b)](_0xcdf7f8));return{'range':_0x41f700,'currentIndex':_0x331d55};}[_0xf7bdc8(0x1aa)](_0x2e07dd){const _0x2443e0=_0xf7bdc8;if(!_0x2e07dd[_0x2443e0(0x24e)][_0x2443e0(0x196)](_0x2443e0(0x1ee)))return;const _0x5aa801=_0x2e07dd[_0x2443e0(0x2b0)][_0x2443e0(0x2bb)](_0x2443e0(0x2a3)),_0x3e0ea6=_0x2e07dd[_0x2443e0(0x2b0)][_0x2443e0(0x2bb)](_0x2443e0(0x265));this[_0x2443e0(0x2b3)](_0x5aa801,_0x2443e0(0x174),(_0x479db6,_0x3460d4,_0x4bee7d)=>{const _0x3267c4=_0x2443e0,_0x48b7cc=this[_0x3267c4(0x268)][_0x3267c4(0x2bb)](_0x3460d4);if(!_0x48b7cc)return;const _0x21a65d=this[_0x3267c4(0x22a)][_0x3267c4(0x24f)](_0x48b7cc[_0x3267c4(0x1f3)])[_0x3267c4(0x1c0)](_0x48b7cc[_0x3267c4(0x2ae)]);_0x48b7cc[_0x3267c4(0x195)][_0x3267c4(0x1d9)](_0x124ffb=>_0x21a65d[_0x3267c4(0x2cb)](_0x124ffb,_0x3267c4(0x1a1))),this[_0x3267c4(0x268)][_0x3267c4(0x1b4)](_0x3460d4),this[_0x3267c4(0x268)][_0x3267c4(0x2bf)](_0x4bee7d,_0x48b7cc);}),this[_0x2443e0(0x2b3)](_0x3e0ea6,_0x2443e0(0x174),(_0x3df2d8,_0xacc5d0,_0x485acd)=>{const _0x7274da=_0x2443e0,_0x35bff1=this[_0x7274da(0x268)][_0x7274da(0x2bb)](_0xacc5d0);if(!_0x35bff1)return;const _0x153fb6=this[_0x7274da(0x22a)][_0x7274da(0x24f)](_0x35bff1[_0x7274da(0x1f3)])[_0x7274da(0x1c0)](_0x35bff1[_0x7274da(0x2ae)]);_0x35bff1[_0x7274da(0x195)][_0x7274da(0x1d9)](_0x146fc1=>_0x153fb6[_0x7274da(0x2cb)](_0x146fc1,_0x7274da(0x229))),this[_0x7274da(0x268)][_0x7274da(0x1b4)](_0xacc5d0),this[_0x7274da(0x268)][_0x7274da(0x2bf)](_0x485acd,_0x35bff1);});}async[_0xf7bdc8(0x2a0)](_0x21cf33){const _0x494736=_0xf7bdc8;this[_0x494736(0x16c)][_0x494736(0x24e)][_0x494736(0x2bb)](_0x20014a)[_0x494736(0x18d)](),this[_0x494736(0x298)][_0x494736(0x1f0)](_0x494736(0x240)),this[_0x494736(0x298)][_0x494736(0x1db)](!0x0),await this[_0x494736(0x272)]();try{await this[_0x494736(0x282)][_0x494736(0x1cd)](_0x21cf33)[_0x494736(0x2aa)](),await this[_0x494736(0x253)](_0x21cf33),this[_0x494736(0x27f)]('\x20');const {sessionId:_0x7be23}=this[_0x494736(0x2c9)][_0x494736(0x280)]();await this[_0x494736(0x22a)][_0x494736(0x1f1)](_0x21cf33,_0x7be23),this[_0x494736(0x22a)][_0x494736(0x20d)]()&&this[_0x494736(0x22a)][_0x494736(0x205)](_0x5f46ca(this[_0x494736(0x16c)][_0x494736(0x1f8)],_0x494736(0x2b2)));}catch(_0x2a59e9){this[_0x494736(0x298)][_0x494736(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x494736(0x16c)][_0x494736(0x1f8)],_0x494736(0x19f)),'id':_0x21cf33}),this[_0x494736(0x25a)](new _0x217c5a(_0x494736(0x29d),this,{'error':_0x2a59e9}));}finally{this[_0x494736(0x16c)][_0x494736(0x24e)][_0x494736(0x2bb)](_0x4f4427)[_0x494736(0x213)][_0x494736(0x22b)](_0x494736(0x222)),this[_0x494736(0x298)][_0x494736(0x228)](),this[_0x494736(0x298)][_0x494736(0x1f0)](_0x494736(0x231)),this[_0x494736(0x298)][_0x494736(0x1db)](!0x1);}}[_0xf7bdc8(0x20c)](_0x4a7394){const _0x4d8951=_0xf7bdc8;this[_0x4d8951(0x22a)]['id']===_0x4a7394&&this[_0x4d8951(0x253)]();}async[_0xf7bdc8(0x219)](){const _0x5b7932=_0xf7bdc8,_0x90b566=this[_0x5b7932(0x2c9)][_0x5b7932(0x239)]();this[_0x5b7932(0x22a)]?.[_0x5b7932(0x170)](_0x90b566),this[_0x5b7932(0x22a)]?.[_0x5b7932(0x205)](_0x5f46ca(this[_0x5b7932(0x16c)][_0x5b7932(0x1f8)],_0x5b7932(0x2b2)));}[_0xf7bdc8(0x2c4)](){const _0x26c05a=_0xf7bdc8;this[_0x26c05a(0x22a)]?.[_0x26c05a(0x23c)]();}[_0xf7bdc8(0x1fe)](){const _0x4e2334=_0xf7bdc8;this[_0x4e2334(0x298)][_0x4e2334(0x1fe)]();}async[_0xf7bdc8(0x176)](){const _0x547058=_0xf7bdc8;await this[_0x547058(0x253)]();}async[_0xf7bdc8(0x2af)]({message:_0xec70f9,quickActionData:_0x3f4ac9}){const _0x817bd6=_0xf7bdc8;await this[_0x817bd6(0x25d)]({'userMessage':_0xec70f9,'quickActionData':_0x3f4ac9});}[_0xf7bdc8(0x214)](){const _0x4e18c3=_0xf7bdc8,_0xaa3607=this[_0x4e18c3(0x16c)][_0x4e18c3(0x25b)][_0x4e18c3(0x2bb)](_0x4e18c3(0x2ca));if(!_0xaa3607)throw new _0x217c5a(_0x4e18c3(0x241),this);return _0xaa3607;}async[_0xf7bdc8(0x253)](_0xa73a55){const _0x4b9de8=_0xf7bdc8;try{this[_0x4b9de8(0x298)][_0x4b9de8(0x1cb)](),await this[_0x4b9de8(0x197)](_0xa73a55);}catch(_0x354a23){this[_0x4b9de8(0x298)][_0x4b9de8(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x4b9de8(0x16c)][_0x4b9de8(0x1f8)],_0x4b9de8(0x23b)),'id':_0xa73a55||_0x532b26()}),console[_0x4b9de8(0x2ba)](_0x354a23),this[_0x4b9de8(0x22a)]=void 0x0,this[_0x4b9de8(0x298)][_0x4b9de8(0x271)]();}}async[_0xf7bdc8(0x197)](_0x5ddf43){const _0x1923d8=_0xf7bdc8,_0x51c89b=this[_0x1923d8(0x16c)][_0x1923d8(0x24e)][_0x1923d8(0x2bb)](_0x20014a);let _0x216f5e;_0x51c89b[_0x1923d8(0x1f7)]&&_0x51c89b[_0x1923d8(0x18d)](),_0x5ddf43||!this[_0x1923d8(0x22a)]?_0x216f5e=this[_0x1923d8(0x16c)][_0x1923d8(0x25b)][_0x1923d8(0x2bb)](_0x1923d8(0x201)):this[_0x1923d8(0x298)][_0x1923d8(0x2b9)]&&(_0x216f5e=this[_0x1923d8(0x22a)][_0x1923d8(0x1bc)]['id']),await this[_0x1923d8(0x272)]();const _0x575cae=this[_0x1923d8(0x214)](),_0x157ced=_0x5ddf43||_0x532b26();this[_0x1923d8(0x22a)]=new _0x208493({'connector':this[_0x1923d8(0x282)],'chatModels':this[_0x1923d8(0x270)],'selectedModelId':_0x216f5e,'conversationId':_0x157ced,'group':_0x575cae,'getEditor':()=>_0x554683(this[_0x1923d8(0x16c)])}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1af),(_0x1f5c86,_0x350bed)=>{const _0x4ff60c=_0x1923d8;this[_0x4ff60c(0x298)][_0x4ff60c(0x28c)](_0x350bed),this[_0x4ff60c(0x298)][_0x4ff60c(0x1c8)](),this[_0x4ff60c(0x298)][_0x4ff60c(0x248)](),this[_0x4ff60c(0x298)][_0x4ff60c(0x278)](),_0x5ddf43||(this[_0x4ff60c(0x298)][_0x4ff60c(0x1fa)](),this[_0x4ff60c(0x22a)]?.[_0x4ff60c(0x205)](_0x5f46ca(this[_0x4ff60c(0x16c)][_0x4ff60c(0x1f8)],_0x4ff60c(0x2b2))));}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x254),(_0x84b101,_0x53aebb)=>{const _0x1f2a9f=_0x1923d8;this[_0x1f2a9f(0x298)][_0x1f2a9f(0x2b6)](_0x53aebb[_0x1f2a9f(0x266)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x166),(_0x2b04f7,_0x9f9436)=>{const _0x37a09b=_0x1923d8;this[_0x37a09b(0x298)][_0x37a09b(0x1b9)](_0x9f9436);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x167),()=>{const _0x18f348=_0x1923d8;this[_0x18f348(0x298)][_0x18f348(0x200)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1fc),()=>{const _0x1b3c39=_0x1923d8;this[_0x1b3c39(0x298)][_0x1b3c39(0x200)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1c1),(_0xb892e2,_0x6fa17d)=>{const _0x20c793=_0x1923d8;this[_0x20c793(0x298)][_0x20c793(0x190)](_0x6fa17d,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c3),(_0xfc980b,_0x42a3be)=>{const _0x6f4b46=_0x1923d8;this[_0x6f4b46(0x298)][_0x6f4b46(0x190)](_0x42a3be,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x16a),()=>{const _0x49b8af=_0x1923d8;this[_0x49b8af(0x298)][_0x49b8af(0x1f5)]();}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x209),async()=>{const _0x139d10=_0x1923d8;await this[_0x139d10(0x298)][_0x139d10(0x269)]();}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2ac),(_0x1dfc29,_0x2d0f94)=>{const _0x20e0e4=_0x1923d8;this[_0x20e0e4(0x298)][_0x20e0e4(0x296)](_0x2d0f94['id']);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c6),(_0x56216c,_0x342504,_0x5d0c53)=>{const _0x2ab97d=_0x1923d8;this[_0x2ab97d(0x27f)](_0x342504,_0x5d0c53);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x281),(_0x69d1ae,_0x23787c)=>{const _0x1cd884=_0x1923d8;_0x1cd884(0x2c8)===_0x23787c[_0x1cd884(0x180)]?this[_0x1cd884(0x298)][_0x1cd884(0x299)](_0x23787c):this[_0x1cd884(0x298)][_0x1cd884(0x1c3)](_0x23787c);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x264),async(_0x2ef82d,_0x153da3)=>{const _0x1ec96e=_0x1923d8;await this[_0x1ec96e(0x2b5)]({'reply':_0x153da3});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x189),(_0x55bb5d,{reply:_0x4c3e9f,index:_0x25f1a9,state:_0x197658})=>{const _0x2c3b0f=_0x1923d8;this[_0x2c3b0f(0x298)][_0x2c3b0f(0x26f)]({'id':_0x4c3e9f['id'],'index':_0x25f1a9,'state':_0x197658});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x29b),(_0x1423eb,_0x11e537)=>{const _0x415cca=_0x1923d8;if(this[_0x415cca(0x298)][_0x415cca(0x287)](_0x11e537[_0x415cca(0x242)],_0x11e537[_0x415cca(0x1d7)]),_0x415cca(0x215)===_0x11e537[_0x415cca(0x242)][_0x415cca(0x180)]){const _0x29956b=[..._0x554683(this[_0x415cca(0x16c)])[_0x415cca(0x220)][_0x415cca(0x237)][_0x415cca(0x215)][_0x415cca(0x238)]()];this[_0x415cca(0x2c9)][_0x415cca(0x15f)](_0x29956b,_0x415cca(0x25f)+this[_0x415cca(0x22a)]?.['id']);}}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x16e),(_0x2bb317,_0x4863d1)=>{const _0x353e9c=_0x1923d8;this[_0x353e9c(0x298)][_0x353e9c(0x244)](_0x4863d1[_0x353e9c(0x29a)]),_0x353e9c(0x28d)==_0x4863d1[_0x353e9c(0x29a)]&&this[_0x353e9c(0x2c4)](),_0x353e9c(0x215)===_0x4863d1[_0x353e9c(0x180)]&&this[_0x353e9c(0x2c9)][_0x353e9c(0x1ed)](_0x353e9c(0x25f)+this[_0x353e9c(0x22a)]?.['id']);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x212),(_0x1795c2,_0x380a2a)=>{const _0x462daa=_0x1923d8;this[_0x462daa(0x298)][_0x462daa(0x260)](_0x380a2a[_0x462daa(0x242)][_0x462daa(0x29a)],_0x380a2a[_0x462daa(0x1d7)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1c6),(_0x534ffa,_0x30d29d)=>{const _0x336a66=_0x1923d8;this[_0x336a66(0x298)][_0x336a66(0x255)](_0x30d29d[_0x336a66(0x2b7)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1b3),(_0x5d18d8,_0x5cb41a)=>{const _0x9ec1a8=_0x1923d8;this[_0x9ec1a8(0x298)][_0x9ec1a8(0x1c5)](_0x5cb41a[_0x9ec1a8(0x1c2)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x258),(_0x692211,_0x3f2a13)=>{const _0x5a9bc9=_0x1923d8;this[_0x5a9bc9(0x298)][_0x5a9bc9(0x22c)](_0x3f2a13[_0x5a9bc9(0x223)],_0x3f2a13[_0x5a9bc9(0x234)],_0x3f2a13[_0x5a9bc9(0x274)],_0x3f2a13[_0x5a9bc9(0x1ea)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2a6),(_0x48c5ed,_0x3a0668)=>{const _0x410db9=_0x1923d8;this[_0x410db9(0x298)][_0x410db9(0x26e)](_0x3a0668[_0x410db9(0x223)],_0x3a0668[_0x410db9(0x1ad)],_0x3a0668[_0x410db9(0x17a)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c1),(_0x7c6df4,_0x3e4498)=>{const _0x59259e=_0x1923d8;this[_0x59259e(0x298)][_0x59259e(0x245)](_0x3e4498);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x199),(_0x1dcc04,_0xffc481)=>{const _0xa45c2b=_0x1923d8;this[_0xa45c2b(0x298)][_0xa45c2b(0x285)](_0xffc481[_0xa45c2b(0x1bc)],_0xffc481[_0xa45c2b(0x2a1)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2ba),(_0x13e5a4,{error:_0x2106e1,interactionId:_0x14bef7,fileName:_0x391b26,url:_0x3f424a,sourceId:_0x3c1e83,sourceLabel:_0x54726e})=>{const _0x212771=_0x1923d8,_0x3e313a=_0x14bef7?_0x14bef7+':'+_0x532b26():_0x532b26();_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x243))?this[_0x212771(0x298)][_0x212771(0x2a7)]({'staticMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x21e)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1e7))||_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x168))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x23b)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1bb))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1e5),_0x391b26),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1a2))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x297),_0x3f424a),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1bd))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x24d)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x2a9))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1dc)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x275))?(_0x3c1e83&&this[_0x212771(0x298)][_0x212771(0x163)](_0x3c1e83),this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1ab),_0x54726e||_0x212771(0x234)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x18a))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x181)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x161))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x186)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x2c7))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1c7)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x20f))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x221)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1e1))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x27c)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x26c))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x2ab)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x20b)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1));}),await this[_0x1923d8(0x22a)][_0x1923d8(0x160)](this[_0x1923d8(0x16c)][_0x1923d8(0x25b)][_0x1923d8(0x2bb)](_0x1923d8(0x1a3))),_0x5ddf43||await this[_0x1923d8(0x22a)][_0x1923d8(0x194)]();}async[_0xf7bdc8(0x25d)]({userMessage:_0x433f4b,quickActionData:_0x4802a0}){const _0x5386b3=_0xf7bdc8;if(!this[_0x5386b3(0x22a)])throw new _0x217c5a(_0x5386b3(0x169));this[_0x5386b3(0x22a)][_0x5386b3(0x19b)]()&&await this[_0x5386b3(0x22a)][_0x5386b3(0x29f)](this[_0x5386b3(0x2c9)][_0x5386b3(0x280)]()),this[_0x5386b3(0x22a)]['id']&&this[_0x5386b3(0x22a)][_0x5386b3(0x286)]&&await this[_0x5386b3(0x22a)][_0x5386b3(0x1f6)]({'userMessage':_0x433f4b,'quickActionData':_0x4802a0}),this[_0x5386b3(0x19d)]();}[_0xf7bdc8(0x19d)](){const _0x17c60d=_0xf7bdc8,_0x59e18f=_0x554683(this[_0x17c60d(0x16c)])[_0x17c60d(0x220)],_0xa20e78=Array[_0x17c60d(0x1e9)](_0x59e18f[_0x17c60d(0x22d)][_0x17c60d(0x2b4)](_0x3ca273));_0x59e18f[_0x17c60d(0x2a5)](_0x557952=>{const _0x3e6c6c=_0x17c60d;_0xa20e78[_0x3e6c6c(0x1d9)](_0x543eb3=>_0x557952[_0x3e6c6c(0x1eb)](_0x543eb3));});}[_0xf7bdc8(0x1ac)](){const _0x57458f=_0xf7bdc8;console[_0x57458f(0x1df)](_0x57458f(0x18e));}[_0xf7bdc8(0x247)](_0x119608){const _0xd97bfc=_0xf7bdc8;this[_0xd97bfc(0x298)][_0xd97bfc(0x23d)](_0x119608);}[_0xf7bdc8(0x25a)](_0x27b2cf){const _0x1203ca=_0xf7bdc8;_0x39c475(_0x27b2cf[_0x1203ca(0x261)]);}[_0xf7bdc8(0x1a9)](_0x42ba26){const _0x112d60=_0xf7bdc8;this[_0x112d60(0x22a)]?.[_0x112d60(0x2cc)](_0x42ba26);}[_0xf7bdc8(0x29c)](){const _0x2f1f3e=_0xf7bdc8;this[_0x2f1f3e(0x22a)]?.[_0x2f1f3e(0x27e)]();}[_0xf7bdc8(0x2a4)](){const _0x3da564=_0xf7bdc8;this[_0x3da564(0x22a)]?.[_0x3da564(0x1ba)]();}[_0xf7bdc8(0x162)](_0x2d404d){const _0x51d411=_0xf7bdc8,[_0x1eed6,_0x519ace]=_0x2d404d[_0x51d411(0x1a5)](':'),_0x4ec000=this[_0x51d411(0x22a)][_0x51d411(0x24f)](_0x1eed6),_0x9dbae0=_0x4ec000[_0x51d411(0x1c0)](_0x519ace);return{'interaction':_0x4ec000,'reply':_0x9dbae0};}[_0xf7bdc8(0x1b6)](_0x57a4a0,_0x4ba381=!0x1){const _0x2c5974=_0xf7bdc8,_0x3475c8=_0x554683(this[_0x2c5974(0x16c)]),_0xcefb14={'target':_0x3475c8[_0x2c5974(0x165)][_0x2c5974(0x213)][_0x2c5974(0x1b2)][_0x2c5974(0x235)](_0x3475c8[_0x2c5974(0x165)][_0x2c5974(0x188)][_0x2c5974(0x292)](_0x57a4a0)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x4ba381};_0x4ba381&&(_0xcefb14[_0x2c5974(0x257)]=!0x0),_0x145ff8(_0xcefb14);}[_0xf7bdc8(0x27f)](_0x55b0fa,_0x42df8b=!0x1){const _0x56fc10=_0xf7bdc8;this[_0x56fc10(0x298)][_0x56fc10(0x2c6)](_0x55b0fa||_0x5f46ca(this[_0x56fc10(0x16c)][_0x56fc10(0x1f8)],_0x56fc10(0x1cc)),_0x42df8b);}async[_0xf7bdc8(0x2b5)]({reply:_0x1a80b3,renderingStrategy:_0x4e1417}){const _0x5b28c4=_0xf7bdc8,{id:_0x5a0409,isDone:_0x5f3e83,type:_0x5e9a75,parsedContent:_0x1cf02b}=_0x1a80b3;if(_0x5b28c4(0x295)===_0x5e9a75){const _0x1c75ca=_0x1a80b3[_0x5b28c4(0x28b)]({'showDiff':this[_0x5b28c4(0x298)][_0x5b28c4(0x1f4)]});await this[_0x5b28c4(0x298)][_0x5b28c4(0x1d0)]({'id':_0x5a0409,'parts':_0x1c75ca,'renderingStrategy':_0x4e1417,'isDone':_0x5f3e83});}else _0x5b28c4(0x2c8)===_0x5e9a75&&await this[_0x5b28c4(0x298)][_0x5b28c4(0x1bf)]({'id':_0x5a0409,'parsedContent':_0x1cf02b,'renderingStrategy':_0x4e1417,'isDone':_0x5f3e83});_0x5f3e83&&_0x1a80b3[_0x5b28c4(0x1dd)][_0x5b28c4(0x26a)]>0x0&&this[_0x5b28c4(0x298)][_0x5b28c4(0x1d1)](_0x5a0409,_0x1a80b3[_0x5b28c4(0x1dd)]);}async[_0xf7bdc8(0x272)](){const _0x11ef7a=_0xf7bdc8,_0x59bc81=this[_0x11ef7a(0x22a)]?.[_0x11ef7a(0x24b)];_0x59bc81&&(_0x59bc81[_0x11ef7a(0x20a)](),this[_0x11ef7a(0x298)][_0x11ef7a(0x1ca)](_0x59bc81));}async[_0xf7bdc8(0x2c2)](){const _0xdb9e4a=_0xf7bdc8,_0x367ec0=this[_0xdb9e4a(0x22a)]?.[_0xdb9e4a(0x24b)];if(_0x367ec0){for await(const _0x123b93 of _0x367ec0[_0xdb9e4a(0x21f)])await this[_0xdb9e4a(0x2b5)]({'reply':_0x123b93,'renderingStrategy':_0xdb9e4a(0x240)});}}[_0xf7bdc8(0x24a)](_0x156fdc){const _0x4a74d2=_0xf7bdc8,_0x559feb={'positiveCount':_0x156fdc[_0x4a74d2(0x1d2)][_0x4a74d2(0x226)](_0x4d90d2=>_0x4a74d2(0x229)===_0x4d90d2[_0x4a74d2(0x1c4)])[_0x4a74d2(0x26a)],'totalCount':_0x156fdc[_0x4a74d2(0x1d2)][_0x4a74d2(0x26a)],'modificationId':_0x156fdc['id']},_0x53dba3=this[_0x4a74d2(0x22a)][_0x4a74d2(0x24f)](_0x156fdc[_0x4a74d2(0x1f3)])[_0x4a74d2(0x2c0)];this[_0x4a74d2(0x282)][_0x4a74d2(0x21d)](this[_0x4a74d2(0x22a)]['id'],_0x53dba3,_0x559feb);}}
|
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x20bb56=_0x505e;function _0x505e(_0x479c1a,_0x409360){const _0x525887=_0x5258();return _0x505e=function(_0x505e62,_0x42d0fd){_0x505e62=_0x505e62-0x12e;let _0x382a38=_0x525887[_0x505e62];return _0x382a38;},_0x505e(_0x479c1a,_0x409360);}function _0x5258(){const _0x5f3b38=['_interactionPromiseResolver','areActionsDisabled','4314150tElMuc','populateSourceResourceBalloon','streaming','interactionId','setFeedItemRenderingStrategy','scrollToSuggestion','_promiseQueue','isLoading','stopInteraction','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','_getLoadingMessage','addFeedItemUserMessage','setContextItemLoading','forEach','removeFeedInteraction','addFeedInteractionHeader','setIsUploadInProgress','_getInputPlaceholder','last','clearPendingContextUI','AI_CHAT_WELCOME_MESSAGE','ai.availableReplyActions','length','removeContextItem','destroy','_animateConversationTitle','14724XVhdyT','conversation-start','isMaximized','88jMWlUF','config','chat','setLoadingMessage','view','feedItemRenderingStrategy','insertSuggestion','updateWebSources','_view','toggleSuggestionDisplayMode','ai-reply','resetMessageInput','setAddContextOptions','updateFeedInteractionHeader','updateSuggestionPartState','closeSourceResourceBalloon','setInputPlaceholder','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','values','delegate','remove','addFeedItemAIReply','startAutoScroll','disableModelSelector','setConversationContext','updateFeedItemAIReplyContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','clear','1516419ivXSak','interaction-header','set','startInteraction','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','markFeedItemAsDone','5189268qmledL','isModelAvailable','isWebSearchEnabled','userMessage','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','isReasoningEnabled','trackChanges','scrollFeedToSuggestion','</p>','children','label','has','isTrackChangesOn','showDiff','addFeedItemError','user-message','addTab','pluginName','chatHeader','quickActionData','showResizeButton','capabilities','value','isDone','displayedPrompt','AI_CHAT_HEADING','updateFeedItemAIReplySuggestionPartState','isPremiumPlugin','isDisabled','queueEmptyPromise','stopAutoScroll','bind','TrackChanges','setReasoning','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','commands','<p>','setSelectedModel','setWebSearch','resetConversationTitle','addFeedItemStaticMessage','updateCapabilities','655TWpgtL','locale','focusPromptInput','contextItems','options','isPending','setModelList','121155ZwzXEz','isVisible','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','addFeedItemAISuggestion','find','markItemAsDone','setModel','filter','disableControls','enableModelSelector','chatFeed','createConversation','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','chatControls','plugins','addItem','finishInteraction','3293900Hltciv','AIChatUI','isOfficialPlugin','availableModels','error-message','removeItem','updateFeedItemAIReplySuggestionContent','_isTrackChangesCommandValueBound','AITabs','renderingStrategy','toggleLoadingSkeleton','ai-suggestion-reply','updateResourceState','168881kokTMx','setConversationTitle','ai.chat.models.modelSelectorAlwaysVisible','requires','updateReplyItem','startsWith','ai.chat.context.searchInputVisibleFrom','6OJkqeC','get','context','8OoTzSP','enableControls','isBusy','clearConversationContextUI','then','updateSuggestionItem','from','enqueue','_titleAnimationInterval','getItemIds','abort','setIsMaximized','updateFeedItemAIReplySources','addContextItem'];_0x5258=function(){return _0x5f3b38;};return _0x5258();}(function(_0x1a7ab7,_0x452ffd){const _0x31d71a=_0x505e,_0x3bfb4a=_0x1a7ab7();while(!![]){try{const _0x196694=-parseInt(_0x31d71a(0x185))/0x1*(parseInt(_0x31d71a(0x18c))/0x2)+parseInt(_0x31d71a(0x167))/0x3+parseInt(_0x31d71a(0x1b9))/0x4*(-parseInt(_0x31d71a(0x160))/0x5)+-parseInt(_0x31d71a(0x19f))/0x6+-parseInt(_0x31d71a(0x136))/0x7+-parseInt(_0x31d71a(0x18f))/0x8*(-parseInt(_0x31d71a(0x130))/0x9)+parseInt(_0x31d71a(0x178))/0xa*(parseInt(_0x31d71a(0x1bc))/0xb);if(_0x196694===_0x452ffd)break;else _0x3bfb4a['push'](_0x3bfb4a['shift']());}catch(_0x12ada4){_0x3bfb4a['push'](_0x3bfb4a['shift']());}}}(_0x5258,0x60629));import{ContextPlugin as _0x25ff34}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x52e168}from'ckeditor5/src/utils.js';import{AIChatView as _0x49cec3}from'./ui/aichatview.js';import{AITabs as _0x5265e0}from'../aitabs/aitabs.js';import{getTranslation as _0x45c9d6}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x22c53c}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x1530dc}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x2949d2}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x4d811d}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x334a5a}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x1011f5}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x25ff34{static get[_0x20bb56(0x188)](){return[_0x5265e0];}[_0x20bb56(0x1c4)];static get[_0x20bb56(0x147)](){const _0x3626b2=_0x20bb56;return _0x3626b2(0x179);}static get[_0x20bb56(0x17a)](){return!0x0;}static get[_0x20bb56(0x151)](){return!0x0;}[_0x20bb56(0x1c1)]=_0x20bb56(0x1a1);[_0x20bb56(0x143)]=!0x0;[_0x20bb56(0x1a5)];[_0x20bb56(0x19d)];[_0x20bb56(0x197)]=void 0x0;[_0x20bb56(0x17f)]=!0x1;constructor(_0x4242ee){const _0x4fb6f1=_0x20bb56;super(_0x4242ee);const _0xb6479c=this[_0x4fb6f1(0x18e)][_0x4fb6f1(0x175)][_0x4fb6f1(0x18d)](_0x4fb6f1(0x180));this[_0x4fb6f1(0x132)](_0x4fb6f1(0x191),!0x1),this[_0x4fb6f1(0x1a5)]=new _0x2949d2(),this[_0x4fb6f1(0x1c4)]=new _0x49cec3(this[_0x4fb6f1(0x18e)][_0x4fb6f1(0x161)],{'showResizeButton':_0xb6479c[_0x4fb6f1(0x14a)],'contextResourcesSearchInputVisibleFrom':this[_0x4fb6f1(0x18e)][_0x4fb6f1(0x1bd)][_0x4fb6f1(0x18d)](_0x4fb6f1(0x18b))}),this[_0x4fb6f1(0x1c4)][_0x4fb6f1(0x1cf)](..._0x4d811d)['to'](this),this[_0x4fb6f1(0x1c4)]['on'](_0x4fb6f1(0x1c5),(_0x48135f,{showDiff:_0x664736})=>{const _0x177666=_0x4fb6f1;this[_0x177666(0x143)]=_0x664736;}),_0xb6479c[_0x4fb6f1(0x1c0)][_0x4fb6f1(0x146)]({'id':_0x4fb6f1(0x1be),'buttonLabel':_0x45c9d6(this[_0x4fb6f1(0x18e)][_0x4fb6f1(0x161)],_0x4fb6f1(0x14f)),'buttonIcon':_0x22c53c,'order':0x0,'content':this[_0x4fb6f1(0x1c4)]}),this[_0x4fb6f1(0x1c4)][_0x4fb6f1(0x174)][_0x4fb6f1(0x155)](_0x4fb6f1(0x1a6))['to'](this,_0x4fb6f1(0x191),_0x344481=>_0x344481),this[_0x4fb6f1(0x1c4)][_0x4fb6f1(0x171)][_0x4fb6f1(0x155)](_0x4fb6f1(0x165))['to'](this,_0x4fb6f1(0x191),_0x3278a0=>_0x3278a0),this[_0x4fb6f1(0x1c4)][_0x4fb6f1(0x174)][_0x4fb6f1(0x1cc)](this[_0x4fb6f1(0x1b0)]()),this[_0x4fb6f1(0x155)](_0x4fb6f1(0x137))['to'](this[_0x4fb6f1(0x1c4)][_0x4fb6f1(0x174)],_0x4fb6f1(0x137));}[_0x20bb56(0x1b7)](){const _0x3eb909=_0x20bb56;super[_0x3eb909(0x1b7)](),this[_0x3eb909(0x197)]&&clearInterval(this[_0x3eb909(0x197)]);}[_0x20bb56(0x172)](_0x1812a0){const _0x1fc1ee=_0x20bb56;this[_0x1fc1ee(0x1c4)][_0x1fc1ee(0x171)][_0x1fc1ee(0x12f)](),this[_0x1fc1ee(0x1c4)][_0x1fc1ee(0x174)][_0x1fc1ee(0x170)](),this[_0x1fc1ee(0x1c4)][_0x1fc1ee(0x174)][_0x1fc1ee(0x166)](_0x1812a0[_0x1fc1ee(0x17b)],!this[_0x1fc1ee(0x18e)][_0x1fc1ee(0x1bd)][_0x1fc1ee(0x18d)](_0x1fc1ee(0x187))),this[_0x1fc1ee(0x15e)]({'id':_0x1fc1ee(0x1ba),'staticMessage':_0x45c9d6(this[_0x1fc1ee(0x18e)][_0x1fc1ee(0x161)],_0x1fc1ee(0x1b3))});}[_0x20bb56(0x15e)]({id:_0x433e3e,staticMessage:_0x892ec5}){const _0x1e8de6=_0x20bb56;this[_0x1e8de6(0x1c4)][_0x1e8de6(0x171)][_0x1e8de6(0x176)](_0x1e8de6(0x1c6),{'id':_0x433e3e,'initialContent':_0x1e8de6(0x15a)+_0x892ec5+_0x1e8de6(0x13e)});}[_0x20bb56(0x1aa)](_0x94e623){const _0x281fe0=_0x20bb56,_0x262eb2=_0x94e623[_0x281fe0(0x149)]?.[_0x281fe0(0x14e)]||_0x94e623[_0x281fe0(0x139)];this[_0x281fe0(0x1c4)][_0x281fe0(0x171)][_0x281fe0(0x176)](_0x281fe0(0x145),{'contextItems':Array[_0x281fe0(0x195)](_0x94e623[_0x281fe0(0x163)][_0x281fe0(0x1ce)]()),'initialContent':_0x281fe0(0x15a)+_0x262eb2+_0x281fe0(0x13e),'id':_0x94e623['id']});}[_0x20bb56(0x144)]({errorMessage:_0xfeba6d,id:_0x251383}){const _0x163a22=_0x20bb56;this[_0x163a22(0x1c4)][_0x163a22(0x171)][_0x163a22(0x176)](_0x163a22(0x17c),{'initialContent':_0x163a22(0x15a)+_0xfeba6d+_0x163a22(0x13e),'id':_0x251383});}[_0x20bb56(0x1d1)](_0x468de0){const _0x104b31=_0x20bb56;return this[_0x104b31(0x1a5)][_0x104b31(0x196)](async()=>{const _0x137744=_0x104b31;this[_0x137744(0x1c4)][_0x137744(0x171)][_0x137744(0x176)](_0x137744(0x1c6),{'id':_0x468de0[_0x137744(0x1a2)]+':'+_0x468de0['id']}),this[_0x137744(0x1bf)](null);});}async[_0x20bb56(0x16a)](_0x327d48){const _0x17c5ae=_0x20bb56,_0xb05434=_0x334a5a(this[_0x17c5ae(0x18e)]);let _0x877f21=_0xb05434[_0x17c5ae(0x1bd)][_0x17c5ae(0x18d)](_0x17c5ae(0x1b4))||[..._0x1011f5];if(_0xb05434[_0x17c5ae(0x175)][_0x17c5ae(0x141)](_0x17c5ae(0x156))){if(!this[_0x17c5ae(0x17f)]){this[_0x17c5ae(0x17f)]=!0x0;const _0xb8fd49=_0xb05434[_0x17c5ae(0x159)][_0x17c5ae(0x18d)](_0x17c5ae(0x13c));this[_0x17c5ae(0x1c4)][_0x17c5ae(0x171)][_0x17c5ae(0x155)](_0x17c5ae(0x142))['to'](_0xb8fd49,_0x17c5ae(0x14c));}}else _0x877f21=_0x877f21[_0x17c5ae(0x16e)](_0x553ad4=>_0x17c5ae(0x1c2)!=_0x553ad4);return this[_0x17c5ae(0x1a5)][_0x17c5ae(0x196)](async()=>{const _0x4467fb=_0x17c5ae;this[_0x4467fb(0x1c4)][_0x4467fb(0x171)][_0x4467fb(0x176)](_0x4467fb(0x183),{'id':_0x327d48[_0x4467fb(0x1a2)]+':'+_0x327d48['id'],'areActionsDisabled':_0x327d48[_0x4467fb(0x19e)],'showDiff':this[_0x4467fb(0x143)],'availableActions':_0x877f21}),this[_0x4467fb(0x1bf)](null);});}[_0x20bb56(0x1ae)](_0x8f22df,_0x290588){const _0x35fb6b=_0x20bb56,_0x2907bb=this[_0x35fb6b(0x1c4)][_0x35fb6b(0x171)][_0x35fb6b(0x13f)][_0x35fb6b(0x1b1)];if(_0x2907bb instanceof _0x1530dc)return this[_0x35fb6b(0x1c4)][_0x35fb6b(0x171)][_0x35fb6b(0x13f)][_0x35fb6b(0x1d0)](_0x2907bb),void this[_0x35fb6b(0x1c4)][_0x35fb6b(0x171)][_0x35fb6b(0x176)](_0x35fb6b(0x131),{'id':_0x8f22df['id'],'capabilities':{'isWebSearchEnabled':_0x2907bb[_0x35fb6b(0x14b)][_0x35fb6b(0x138)]||_0x290588[_0x35fb6b(0x138)],'isReasoningEnabled':_0x2907bb[_0x35fb6b(0x14b)][_0x35fb6b(0x13b)]||_0x290588[_0x35fb6b(0x13b)]}});this[_0x35fb6b(0x1c4)][_0x35fb6b(0x171)][_0x35fb6b(0x176)](_0x35fb6b(0x131),{'id':_0x8f22df['id'],'capabilities':_0x290588});}[_0x20bb56(0x1c9)](_0x3981d3){const _0x535cb6=_0x20bb56,_0x57063c=this[_0x535cb6(0x1c4)][_0x535cb6(0x171)][_0x535cb6(0x13f)][_0x535cb6(0x16b)](_0x512ac1=>_0x512ac1[_0x535cb6(0x164)]['id']==_0x3981d3['id']&&_0x512ac1 instanceof _0x1530dc);_0x57063c&&_0x57063c[_0x535cb6(0x132)](_0x535cb6(0x168),_0x3981d3[_0x535cb6(0x168)]);}async[_0x20bb56(0x1d5)](_0x46da36){const _0x5128e8=_0x20bb56,_0x697156=_0x46da36[_0x5128e8(0x181)]||this[_0x5128e8(0x1c1)];return this[_0x5128e8(0x1a5)][_0x5128e8(0x196)](async _0x5c0420=>{const _0x8fbf4=_0x5128e8;await this[_0x8fbf4(0x1c4)][_0x8fbf4(0x171)][_0x8fbf4(0x189)]({..._0x46da36,'abortSignal':_0x5c0420,'renderingStrategy':_0x697156}),_0x46da36[_0x8fbf4(0x14d)]&&this[_0x8fbf4(0x135)](_0x46da36['id']);});}[_0x20bb56(0x19b)](_0x5749c8,_0x28620d){const _0x28ac0f=_0x20bb56;this[_0x28ac0f(0x1c4)][_0x28ac0f(0x171)][_0x28ac0f(0x1c3)](_0x5749c8,_0x28620d);}async[_0x20bb56(0x17e)](_0x5b434f){const _0x33e2b7=_0x20bb56,_0x491746=_0x5b434f[_0x33e2b7(0x181)]||this[_0x33e2b7(0x1c1)];return this[_0x33e2b7(0x1a5)][_0x33e2b7(0x196)](async _0x3cfd4d=>{const _0x146473=_0x33e2b7;await this[_0x146473(0x1c4)][_0x146473(0x171)][_0x146473(0x194)]({..._0x5b434f,'abortSignal':_0x3cfd4d,'renderingStrategy':_0x491746}),_0x5b434f[_0x146473(0x14d)]&&this[_0x146473(0x135)](_0x5b434f['id']);});}[_0x20bb56(0x150)](_0x45e0db){const _0x51e2c2=_0x20bb56;this[_0x51e2c2(0x1c4)][_0x51e2c2(0x171)][_0x51e2c2(0x1ca)](_0x45e0db);}[_0x20bb56(0x135)](_0x142f72){const _0x126656=_0x20bb56;this[_0x126656(0x1c4)][_0x126656(0x171)][_0x126656(0x16c)](_0x142f72);}[_0x20bb56(0x1ad)](_0x422bc0){const _0x39c38b=_0x20bb56;this[_0x39c38b(0x1c4)][_0x39c38b(0x171)][_0x39c38b(0x198)]()[_0x39c38b(0x16e)](_0x47d875=>_0x47d875[_0x39c38b(0x18a)](_0x422bc0))[_0x39c38b(0x1ac)](_0x2cd652=>this[_0x39c38b(0x1c4)][_0x39c38b(0x171)][_0x39c38b(0x17d)](_0x2cd652));}[_0x20bb56(0x133)](){const _0x5d5a38=_0x20bb56;this[_0x5d5a38(0x1bf)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x5d5a38(0x1c4)][_0x5d5a38(0x174)][_0x5d5a38(0x1d3)](!this[_0x5d5a38(0x18e)][_0x5d5a38(0x1bd)][_0x5d5a38(0x18d)](_0x5d5a38(0x187))),this[_0x5d5a38(0x191)]=!0x0,this[_0x5d5a38(0x1c4)][_0x5d5a38(0x171)][_0x5d5a38(0x1d2)]();}[_0x20bb56(0x1a7)](_0x41c39d){const _0x4eac0e=_0x20bb56;this[_0x4eac0e(0x1a5)][_0x4eac0e(0x199)](),this[_0x4eac0e(0x1c4)][_0x4eac0e(0x171)][_0x4eac0e(0x198)]()[_0x4eac0e(0x16e)](_0x32b9c8=>_0x32b9c8[_0x4eac0e(0x18a)](_0x41c39d['id']))[_0x4eac0e(0x1ac)](_0x41b1be=>this[_0x4eac0e(0x135)](_0x41b1be)),this[_0x4eac0e(0x191)]=!0x1,this[_0x4eac0e(0x1c4)][_0x4eac0e(0x171)][_0x4eac0e(0x154)]();}async[_0x20bb56(0x177)](){const _0x2ce2eb=_0x20bb56;return this[_0x2ce2eb(0x1a5)][_0x2ce2eb(0x153)][_0x2ce2eb(0x193)](()=>{const _0x4ca036=_0x2ce2eb;this[_0x4ca036(0x191)]=!0x1,this[_0x4ca036(0x1c4)][_0x4ca036(0x171)][_0x4ca036(0x154)]();});}[_0x20bb56(0x19c)](_0x4ca866,_0x26a2db){const _0x342c18=_0x20bb56;this[_0x342c18(0x1c4)][_0x342c18(0x174)][_0x342c18(0x19c)](_0x4ca866,_0x26a2db);}[_0x20bb56(0x1b6)](_0x1b4ebb){const _0x5ce19f=_0x20bb56;this[_0x5ce19f(0x1c4)][_0x5ce19f(0x174)][_0x5ce19f(0x1b6)](_0x1b4ebb);}[_0x20bb56(0x1ab)](_0x58f8af,_0x495bc2){const _0x190860=_0x20bb56;this[_0x190860(0x1c4)][_0x190860(0x174)][_0x190860(0x1ab)](_0x58f8af,_0x495bc2);}[_0x20bb56(0x1af)](_0x3a97a3){const _0x1adf57=_0x20bb56;this[_0x1adf57(0x1c4)][_0x1adf57(0x174)][_0x1adf57(0x1af)](_0x3a97a3);}[_0x20bb56(0x1d4)](_0x54da62){const _0x392add=_0x20bb56;this[_0x392add(0x1c4)][_0x392add(0x174)][_0x392add(0x1d4)](_0x54da62);}[_0x20bb56(0x1b2)](){const _0x826b6b=_0x20bb56;this[_0x826b6b(0x1c4)][_0x826b6b(0x174)][_0x826b6b(0x1b2)]();}[_0x20bb56(0x192)](){const _0xaf8c20=_0x20bb56;this[_0xaf8c20(0x1c4)][_0xaf8c20(0x174)][_0xaf8c20(0x192)]();}[_0x20bb56(0x184)](_0x2374ae,_0x555357,_0x2f4d04){const _0x38b663=_0x20bb56;this[_0x38b663(0x1c4)][_0x38b663(0x174)][_0x38b663(0x184)](_0x2374ae,_0x555357,_0x2f4d04);}[_0x20bb56(0x1c7)](){const _0x4a6e55=_0x20bb56;this[_0x4a6e55(0x1c4)][_0x4a6e55(0x174)][_0x4a6e55(0x1c7)](),this[_0x4a6e55(0x1c4)][_0x4a6e55(0x174)][_0x4a6e55(0x1cc)](this[_0x4a6e55(0x1b0)]());}[_0x20bb56(0x1c8)](_0x12a690){const _0x5d063d=_0x20bb56;this[_0x5d063d(0x1c4)][_0x5d063d(0x174)][_0x5d063d(0x1c8)](_0x12a690);}[_0x20bb56(0x15f)](_0x36d572){const _0x70a8c1=_0x20bb56;this[_0x70a8c1(0x1c4)][_0x70a8c1(0x174)][_0x70a8c1(0x15c)](_0x36d572[_0x70a8c1(0x138)]),this[_0x70a8c1(0x1c4)][_0x70a8c1(0x174)][_0x70a8c1(0x157)](_0x36d572[_0x70a8c1(0x13b)]),this[_0x70a8c1(0x1c4)][_0x70a8c1(0x174)][_0x70a8c1(0x1cc)](this[_0x70a8c1(0x1b0)](_0x36d572));}[_0x20bb56(0x15b)](_0x4ac1a3,_0x1e8262){const _0x411d67=_0x20bb56;this[_0x411d67(0x1c4)][_0x411d67(0x174)][_0x411d67(0x16d)](_0x4ac1a3),_0x1e8262&&this[_0x411d67(0x1c4)][_0x411d67(0x174)][_0x411d67(0x1d3)](!0x1);}[_0x20bb56(0x1a3)](_0x1016a3){const _0x3b346d=_0x20bb56;this[_0x3b346d(0x1c1)]=_0x1016a3;}[_0x20bb56(0x182)](_0x5dbf77){const _0x54e18d=_0x20bb56;this[_0x54e18d(0x1c4)][_0x54e18d(0x171)][_0x54e18d(0x182)](_0x5dbf77);}[_0x20bb56(0x15d)](){const _0x2cb1d7=_0x20bb56;this[_0x2cb1d7(0x186)](_0x45c9d6(this[_0x2cb1d7(0x18e)][_0x2cb1d7(0x161)],_0x2cb1d7(0x14f)));}[_0x20bb56(0x186)](_0x443160,_0x5596a9=!0x1){const _0x596544=_0x20bb56;if(_0x5596a9&&!_0x52e168()&&_0x443160[_0x596544(0x1b5)])return this[_0x596544(0x1c4)][_0x596544(0x148)][_0x596544(0x140)]='',void this[_0x596544(0x1b8)](_0x443160);this[_0x596544(0x1c4)][_0x596544(0x148)][_0x596544(0x140)]=_0x443160;}[_0x20bb56(0x1bf)](_0x38aa60){const _0x1fc7f3=_0x20bb56,_0x2707d2=this[_0x1fc7f3(0x1a9)](_0x38aa60);this[_0x1fc7f3(0x1c4)][_0x1fc7f3(0x171)][_0x1fc7f3(0x1bf)](_0x2707d2);}[_0x20bb56(0x1b8)](_0xe309a6){const _0x1d52c0=_0x20bb56;let _0x461e03=0x0;clearInterval(this[_0x1d52c0(0x197)]),this[_0x1d52c0(0x197)]=setInterval(()=>{const _0x13a8c6=_0x1d52c0;this[_0x13a8c6(0x1c4)][_0x13a8c6(0x148)][_0x13a8c6(0x140)]=this[_0x13a8c6(0x1c4)][_0x13a8c6(0x148)][_0x13a8c6(0x140)]+_0xe309a6[_0x461e03],_0x461e03++,_0x461e03===_0xe309a6[_0x13a8c6(0x1b5)]&&clearInterval(this[_0x13a8c6(0x197)]);},0x1e);}[_0x20bb56(0x19a)](_0xd4fbaf){const _0x4103ac=_0x20bb56;this[_0x4103ac(0x1c4)][_0x4103ac(0x148)][_0x4103ac(0x1bb)]=_0xd4fbaf;}[_0x20bb56(0x1a9)](_0x515e9d){const _0x19fb40=_0x20bb56;return _0x515e9d?_0x515e9d[_0x19fb40(0x138)]&&_0x515e9d[_0x19fb40(0x13b)]?_0x45c9d6(this[_0x19fb40(0x18e)][_0x19fb40(0x161)],_0x19fb40(0x12e)):_0x515e9d[_0x19fb40(0x138)]?_0x45c9d6(this[_0x19fb40(0x18e)][_0x19fb40(0x161)],_0x19fb40(0x134)):_0x515e9d[_0x19fb40(0x13b)]?_0x45c9d6(this[_0x19fb40(0x18e)][_0x19fb40(0x161)],_0x19fb40(0x1a8)):_0x45c9d6(this[_0x19fb40(0x18e)][_0x19fb40(0x161)],_0x19fb40(0x13a)):'';}[_0x20bb56(0x1b0)](_0x2b72c8){const _0x4d8362=_0x20bb56;return _0x2b72c8?_0x2b72c8[_0x4d8362(0x138)]&&_0x2b72c8[_0x4d8362(0x13b)]?_0x45c9d6(this[_0x4d8362(0x18e)][_0x4d8362(0x161)],_0x4d8362(0x169)):_0x2b72c8[_0x4d8362(0x138)]?_0x45c9d6(this[_0x4d8362(0x18e)][_0x4d8362(0x161)],_0x4d8362(0x1cd)):_0x2b72c8[_0x4d8362(0x13b)]?_0x45c9d6(this[_0x4d8362(0x18e)][_0x4d8362(0x161)],_0x4d8362(0x158)):_0x45c9d6(this[_0x4d8362(0x18e)][_0x4d8362(0x161)],_0x4d8362(0x173)):_0x45c9d6(this[_0x4d8362(0x18e)][_0x4d8362(0x161)],_0x4d8362(0x173));}[_0x20bb56(0x1a0)](_0xcdd90,_0x168cdc,_0x1cd633,_0x244b32){const _0x11c6aa=_0x20bb56;this[_0x11c6aa(0x1c4)][_0x11c6aa(0x1a0)](_0xcdd90,_0x168cdc,_0x1cd633,_0x244b32);}[_0x20bb56(0x1cb)](_0x27d383){const _0x218861=_0x20bb56;this[_0x218861(0x1c4)][_0x218861(0x1cb)](_0x27d383);}[_0x20bb56(0x162)](){const _0x2785f2=_0x20bb56;this[_0x2785f2(0x1c4)][_0x2785f2(0x174)][_0x2785f2(0x162)]();}[_0x20bb56(0x13d)](_0x5a147a,_0x4689b4){const _0x3490a3=_0x20bb56;this[_0x3490a3(0x1c4)][_0x3490a3(0x171)][_0x3490a3(0x1a4)](_0x5a147a,_0x4689b4);}[_0x20bb56(0x1d2)](){const _0xda573=_0x20bb56;this[_0xda573(0x1c4)][_0xda573(0x171)][_0xda573(0x1d2)]();}[_0x20bb56(0x16f)](){const _0x16fe8d=_0x20bb56;this[_0x16fe8d(0x1c4)][_0x16fe8d(0x174)][_0x16fe8d(0x152)]=!0x0;}[_0x20bb56(0x190)](){const _0x1043a1=_0x20bb56;this[_0x1043a1(0x1c4)][_0x1043a1(0x174)][_0x1043a1(0x152)]=!0x1;}}
|
|
23
|
+
const _0x3563f4=_0x47d6;(function(_0x4a70e5,_0x5ce4a2){const _0x1eb5e2=_0x47d6,_0x2870a5=_0x4a70e5();while(!![]){try{const _0x5cc71f=parseInt(_0x1eb5e2(0x7e))/0x1+parseInt(_0x1eb5e2(0x9c))/0x2+-parseInt(_0x1eb5e2(0x8a))/0x3+-parseInt(_0x1eb5e2(0xa9))/0x4*(-parseInt(_0x1eb5e2(0xcc))/0x5)+parseInt(_0x1eb5e2(0xea))/0x6*(-parseInt(_0x1eb5e2(0xc3))/0x7)+parseInt(_0x1eb5e2(0xef))/0x8*(parseInt(_0x1eb5e2(0x71))/0x9)+-parseInt(_0x1eb5e2(0x85))/0xa*(-parseInt(_0x1eb5e2(0xa2))/0xb);if(_0x5cc71f===_0x5ce4a2)break;else _0x2870a5['push'](_0x2870a5['shift']());}catch(_0x4b9690){_0x2870a5['push'](_0x2870a5['shift']());}}}(_0x2330,0xdb3cc));import{ContextPlugin as _0x57184f}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x486b0f}from'ckeditor5/src/utils.js';function _0x2330(){const _0xcb50d3=['config','_getInputPlaceholder','interactionId','remove','updateFeedItemAIReplySources','setInputPlaceholder','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','stopInteraction','children','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','values','chatFeed','forEach','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','AIChatUI','clearPendingContextUI','user-message','isOfficialPlugin','context','9hBfyzZ','setContextItemLoading','isDisabled','queueEmptyPromise','isReasoningEnabled','resetConversationTitle','updateWebSources','abort','updateFeedInteractionHeader','isPremiumPlugin','availableModels','focusPromptInput','destroy','1554362JQSjRp','enableControls','updateReplyItem','get','label','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','setConversationContext','440yPJhhE','capabilities','removeItem','ai-reply','streaming','3503127SWuCus','_getLoadingMessage','addTab','populateSourceResourceBalloon','updateResourceState','scrollFeedToSuggestion','closeSourceResourceBalloon','chatHeader','ai-suggestion-reply','then','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','_promiseQueue','addFeedItemError','set','_view','contextItems','markItemAsDone','stopAutoScroll','876050cKhXgL','filter','isDone','isWebSearchEnabled','insertSuggestion','getItemIds','181599jIdrKD','AI_CHAT_WELCOME_MESSAGE','setWebSearch','updateFeedItemAIReplySuggestionContent','areActionsDisabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','conversation-start','8eryHWB','enqueue','showDiff','commands','_isTrackChangesCommandValueBound','toggleLoadingSkeleton','requires','userMessage','updateFeedItemAIReplySuggestionPartState','AI_CHAT_HEADING','bind','removeContextItem','plugins','pluginName','removeFeedInteraction','_titleAnimationInterval','resetMessageInput','last','ai.chat.context.searchInputVisibleFrom','view','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','locale','ai.availableReplyActions','setReasoning','finishInteraction','createConversation','9814931CooxAi','feedItemRenderingStrategy','value','displayedPrompt','setIsUploadInProgress','isVisible','_animateConversationTitle','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','error-message','1286620CykYuB','markFeedItemAsDone','isModelAvailable','length','ai.chat.models.modelSelectorAlwaysVisible','</p>','disableControls','addFeedItemUserMessage','isMaximized','isTrackChangesOn','setLoadingMessage','addItem','setSelectedModel','setAddContextOptions','find','startAutoScroll','trackChanges','chatControls','clear','disableModelSelector','addFeedItemStaticMessage','addContextItem','enableModelSelector','setModel','startsWith','addFeedInteractionHeader','isPending','AITabs','TrackChanges','chat','6jiGeEZ','updateCapabilities','startInteraction','quickActionData','renderingStrategy','1875256aAGkoM','addFeedItemAIReply','setIsMaximized','isLoading','setModelList','interaction-header','options','updateFeedItemAIReplyContent','updateSuggestionPartState','delegate','clearConversationContextUI','updateSuggestionItem','showResizeButton','has','isBusy','addFeedItemAISuggestion','toggleSuggestionDisplayMode','setFeedItemRenderingStrategy','setConversationTitle','_interactionPromiseResolver','<p>','from','scrollToSuggestion'];_0x2330=function(){return _0xcb50d3;};return _0x2330();}import{AIChatView as _0x27ecae}from'./ui/aichatview.js';import{AITabs as _0x5ca0d6}from'../aitabs/aitabs.js';import{getTranslation as _0x404817}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x125337}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x543ae6}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x31cbc7}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3186af}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x47d6(_0x282cd8,_0x1ee269){const _0x23305a=_0x2330();return _0x47d6=function(_0x47d638,_0x18caf0){_0x47d638=_0x47d638-0x6f;let _0x41c0bf=_0x23305a[_0x47d638];return _0x41c0bf;},_0x47d6(_0x282cd8,_0x1ee269);}import{getEditorFromContext as _0x2ebfe9}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x4830ed}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x57184f{static get[_0x3563f4(0xaf)](){return[_0x5ca0d6];}[_0x3563f4(0x98)];static get[_0x3563f4(0xb6)](){const _0x3109e1=_0x3563f4;return _0x3109e1(0x114);}static get[_0x3563f4(0x6f)](){return!0x0;}static get[_0x3563f4(0x7a)](){return!0x0;}[_0x3563f4(0xc4)]=_0x3563f4(0x89);[_0x3563f4(0xab)]=!0x0;[_0x3563f4(0x95)];[_0x3563f4(0x102)];[_0x3563f4(0xb8)]=void 0x0;[_0x3563f4(0xad)]=!0x1;constructor(_0x2872f5){const _0x3cd9c3=_0x3563f4;super(_0x2872f5);const _0x39e399=this[_0x3cd9c3(0x70)][_0x3cd9c3(0xb5)][_0x3cd9c3(0x81)](_0x3cd9c3(0xe7));this[_0x3cd9c3(0x97)](_0x3cd9c3(0xfd),!0x1),this[_0x3cd9c3(0x95)]=new _0x31cbc7(),this[_0x3cd9c3(0x98)]=new _0x27ecae(this[_0x3cd9c3(0x70)][_0x3cd9c3(0xbe)],{'showResizeButton':_0x39e399[_0x3cd9c3(0xfb)],'contextResourcesSearchInputVisibleFrom':this[_0x3cd9c3(0x70)][_0x3cd9c3(0x106)][_0x3cd9c3(0x81)](_0x3cd9c3(0xbb))}),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xf8)](..._0x3186af)['to'](this),this[_0x3cd9c3(0x98)]['on'](_0x3cd9c3(0xff),(_0x4aac14,{showDiff:_0x5205d1})=>{const _0x44984d=_0x3cd9c3;this[_0x44984d(0xab)]=_0x5205d1;}),_0x39e399[_0x3cd9c3(0xbc)][_0x3cd9c3(0x8c)]({'id':_0x3cd9c3(0xe9),'buttonLabel':_0x404817(this[_0x3cd9c3(0x70)][_0x3cd9c3(0xbe)],_0x3cd9c3(0xb2)),'buttonIcon':_0x125337,'order':0x0,'content':this[_0x3cd9c3(0x98)]}),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)][_0x3cd9c3(0xb3)](_0x3cd9c3(0xf2))['to'](this,_0x3cd9c3(0xfd),_0x521b0c=>_0x521b0c),this[_0x3cd9c3(0x98)][_0x3cd9c3(0x111)][_0x3cd9c3(0xb3)](_0x3cd9c3(0xe6))['to'](this,_0x3cd9c3(0xfd),_0x2d2986=>_0x2d2986),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)][_0x3cd9c3(0x10b)](this[_0x3cd9c3(0x107)]()),this[_0x3cd9c3(0xb3)](_0x3cd9c3(0xce))['to'](this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)],_0x3cd9c3(0xce));}[_0x3563f4(0x7d)](){const _0x6d56fd=_0x3563f4;super[_0x6d56fd(0x7d)](),this[_0x6d56fd(0xb8)]&&clearInterval(this[_0x6d56fd(0xb8)]);}[_0x3563f4(0xc2)](_0x531e3e){const _0x16e8ae=_0x3563f4;this[_0x16e8ae(0x98)][_0x16e8ae(0x111)][_0x16e8ae(0xde)](),this[_0x16e8ae(0x98)][_0x16e8ae(0xdd)][_0x16e8ae(0xe2)](),this[_0x16e8ae(0x98)][_0x16e8ae(0xdd)][_0x16e8ae(0xf3)](_0x531e3e[_0x16e8ae(0x7b)],!this[_0x16e8ae(0x70)][_0x16e8ae(0x106)][_0x16e8ae(0x81)](_0x16e8ae(0xd0))),this[_0x16e8ae(0xe0)]({'id':_0x16e8ae(0xa8),'staticMessage':_0x404817(this[_0x16e8ae(0x70)][_0x16e8ae(0xbe)],_0x16e8ae(0xa3))});}[_0x3563f4(0xe0)]({id:_0x5212f0,staticMessage:_0x309ae8}){const _0x1b5a79=_0x3563f4;this[_0x1b5a79(0x98)][_0x1b5a79(0x111)][_0x1b5a79(0xd7)](_0x1b5a79(0x88),{'id':_0x5212f0,'initialContent':_0x1b5a79(0x103)+_0x309ae8+_0x1b5a79(0xd1)});}[_0x3563f4(0xd3)](_0x501074){const _0x287b92=_0x3563f4,_0x4a22a3=_0x501074[_0x287b92(0xed)]?.[_0x287b92(0xc6)]||_0x501074[_0x287b92(0xb0)];this[_0x287b92(0x98)][_0x287b92(0x111)][_0x287b92(0xd7)](_0x287b92(0x116),{'contextItems':Array[_0x287b92(0x104)](_0x501074[_0x287b92(0x99)][_0x287b92(0x110)]()),'initialContent':_0x287b92(0x103)+_0x4a22a3+_0x287b92(0xd1),'id':_0x501074['id']});}[_0x3563f4(0x96)]({errorMessage:_0x3a1733,id:_0x4c1c88}){const _0x511e4f=_0x3563f4;this[_0x511e4f(0x98)][_0x511e4f(0x111)][_0x511e4f(0xd7)](_0x511e4f(0xcb),{'initialContent':_0x511e4f(0x103)+_0x3a1733+_0x511e4f(0xd1),'id':_0x4c1c88});}[_0x3563f4(0xf0)](_0x1e5b55){const _0x1b22e7=_0x3563f4;return this[_0x1b22e7(0x95)][_0x1b22e7(0xaa)](async()=>{const _0x1f09b0=_0x1b22e7;this[_0x1f09b0(0x98)][_0x1f09b0(0x111)][_0x1f09b0(0xd7)](_0x1f09b0(0x88),{'id':_0x1e5b55[_0x1f09b0(0x108)]+':'+_0x1e5b55['id']}),this[_0x1f09b0(0xd6)](null);});}async[_0x3563f4(0xfe)](_0x2b00a4){const _0x19df24=_0x3563f4,_0x17274b=_0x2ebfe9(this[_0x19df24(0x70)]);let _0x89c813=_0x17274b[_0x19df24(0x106)][_0x19df24(0x81)](_0x19df24(0xbf))||[..._0x4830ed];if(_0x17274b[_0x19df24(0xb5)][_0x19df24(0xfc)](_0x19df24(0xe8))){if(!this[_0x19df24(0xad)]){this[_0x19df24(0xad)]=!0x0;const _0x963930=_0x17274b[_0x19df24(0xac)][_0x19df24(0x81)](_0x19df24(0xdc));this[_0x19df24(0x98)][_0x19df24(0x111)][_0x19df24(0xb3)](_0x19df24(0xd5))['to'](_0x963930,_0x19df24(0xc5));}}else _0x89c813=_0x89c813[_0x19df24(0x9d)](_0x507df7=>_0x19df24(0xa0)!=_0x507df7);return this[_0x19df24(0x95)][_0x19df24(0xaa)](async()=>{const _0x3285ad=_0x19df24;this[_0x3285ad(0x98)][_0x3285ad(0x111)][_0x3285ad(0xd7)](_0x3285ad(0x92),{'id':_0x2b00a4[_0x3285ad(0x108)]+':'+_0x2b00a4['id'],'areActionsDisabled':_0x2b00a4[_0x3285ad(0xa6)],'showDiff':this[_0x3285ad(0xab)],'availableActions':_0x89c813}),this[_0x3285ad(0xd6)](null);});}[_0x3563f4(0xe5)](_0x52c381,_0x534dab){const _0x425992=_0x3563f4,_0x579231=this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0x10e)][_0x425992(0xba)];if(_0x579231 instanceof _0x543ae6)return this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0x10e)][_0x425992(0x109)](_0x579231),void this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0xd7)](_0x425992(0xf4),{'id':_0x52c381['id'],'capabilities':{'isWebSearchEnabled':_0x579231[_0x425992(0x86)][_0x425992(0x9f)]||_0x534dab[_0x425992(0x9f)],'isReasoningEnabled':_0x579231[_0x425992(0x86)][_0x425992(0x75)]||_0x534dab[_0x425992(0x75)]}});this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0xd7)](_0x425992(0xf4),{'id':_0x52c381['id'],'capabilities':_0x534dab});}[_0x3563f4(0x79)](_0x249f73){const _0x20d0e6=_0x3563f4,_0x3a49c8=this[_0x20d0e6(0x98)][_0x20d0e6(0x111)][_0x20d0e6(0x10e)][_0x20d0e6(0xda)](_0x4053fd=>_0x4053fd[_0x20d0e6(0xf5)]['id']==_0x249f73['id']&&_0x4053fd instanceof _0x543ae6);_0x3a49c8&&_0x3a49c8[_0x20d0e6(0x97)](_0x20d0e6(0xc8),_0x249f73[_0x20d0e6(0xc8)]);}async[_0x3563f4(0xf6)](_0x1b2e34){const _0x1c2a73=_0x3563f4,_0x47ee52=_0x1b2e34[_0x1c2a73(0xee)]||this[_0x1c2a73(0xc4)];return this[_0x1c2a73(0x95)][_0x1c2a73(0xaa)](async _0x10ce57=>{const _0xeb8cd1=_0x1c2a73;await this[_0xeb8cd1(0x98)][_0xeb8cd1(0x111)][_0xeb8cd1(0x80)]({..._0x1b2e34,'abortSignal':_0x10ce57,'renderingStrategy':_0x47ee52}),_0x1b2e34[_0xeb8cd1(0x9e)]&&this[_0xeb8cd1(0xcd)](_0x1b2e34['id']);});}[_0x3563f4(0x10a)](_0x58474c,_0x3a6865){const _0x26bfe6=_0x3563f4;this[_0x26bfe6(0x98)][_0x26bfe6(0x111)][_0x26bfe6(0x77)](_0x58474c,_0x3a6865);}async[_0x3563f4(0xa5)](_0x104600){const _0x312b88=_0x3563f4,_0x38c910=_0x104600[_0x312b88(0xee)]||this[_0x312b88(0xc4)];return this[_0x312b88(0x95)][_0x312b88(0xaa)](async _0x2ff6f0=>{const _0x34c700=_0x312b88;await this[_0x34c700(0x98)][_0x34c700(0x111)][_0x34c700(0xfa)]({..._0x104600,'abortSignal':_0x2ff6f0,'renderingStrategy':_0x38c910}),_0x104600[_0x34c700(0x9e)]&&this[_0x34c700(0xcd)](_0x104600['id']);});}[_0x3563f4(0xb1)](_0x26ed28){const _0x19d638=_0x3563f4;this[_0x19d638(0x98)][_0x19d638(0x111)][_0x19d638(0xf7)](_0x26ed28);}[_0x3563f4(0xcd)](_0x5be70e){const _0x1fa41a=_0x3563f4;this[_0x1fa41a(0x98)][_0x1fa41a(0x111)][_0x1fa41a(0x9a)](_0x5be70e);}[_0x3563f4(0xb7)](_0x56e106){const _0xa27bc0=_0x3563f4;this[_0xa27bc0(0x98)][_0xa27bc0(0x111)][_0xa27bc0(0xa1)]()[_0xa27bc0(0x9d)](_0x5cfdfc=>_0x5cfdfc[_0xa27bc0(0xe4)](_0x56e106))[_0xa27bc0(0x112)](_0x2850ff=>this[_0xa27bc0(0x98)][_0xa27bc0(0x111)][_0xa27bc0(0x87)](_0x2850ff));}[_0x3563f4(0xec)](){const _0xc2f161=_0x3563f4;this[_0xc2f161(0xd6)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0xc2f161(0x98)][_0xc2f161(0xdd)][_0xc2f161(0xdf)](!this[_0xc2f161(0x70)][_0xc2f161(0x106)][_0xc2f161(0x81)](_0xc2f161(0xd0))),this[_0xc2f161(0xfd)]=!0x0,this[_0xc2f161(0x98)][_0xc2f161(0x111)][_0xc2f161(0xdb)]();}[_0x3563f4(0x10d)](_0x263c87){const _0x1af40b=_0x3563f4;this[_0x1af40b(0x95)][_0x1af40b(0x78)](),this[_0x1af40b(0x98)][_0x1af40b(0x111)][_0x1af40b(0xa1)]()[_0x1af40b(0x9d)](_0x295456=>_0x295456[_0x1af40b(0xe4)](_0x263c87['id']))[_0x1af40b(0x112)](_0x38e6ee=>this[_0x1af40b(0xcd)](_0x38e6ee)),this[_0x1af40b(0xfd)]=!0x1,this[_0x1af40b(0x98)][_0x1af40b(0x111)][_0x1af40b(0x9b)]();}async[_0x3563f4(0xc1)](){const _0x1155a7=_0x3563f4;return this[_0x1155a7(0x95)][_0x1155a7(0x74)][_0x1155a7(0x93)](()=>{const _0x2d58a1=_0x1155a7;this[_0x2d58a1(0xfd)]=!0x1,this[_0x2d58a1(0x98)][_0x2d58a1(0x111)][_0x2d58a1(0x9b)]();});}[_0x3563f4(0xe1)](_0x1d2b34,_0x317379){const _0x577dea=_0x3563f4;this[_0x577dea(0x98)][_0x577dea(0xdd)][_0x577dea(0xe1)](_0x1d2b34,_0x317379);}[_0x3563f4(0xb4)](_0x4cdb71){const _0x38578c=_0x3563f4;this[_0x38578c(0x98)][_0x38578c(0xdd)][_0x38578c(0xb4)](_0x4cdb71);}[_0x3563f4(0x72)](_0x2d6cf5,_0x238490){const _0x3e14f5=_0x3563f4;this[_0x3e14f5(0x98)][_0x3e14f5(0xdd)][_0x3e14f5(0x72)](_0x2d6cf5,_0x238490);}[_0x3563f4(0xc7)](_0x21d9b4){const _0x875e6d=_0x3563f4;this[_0x875e6d(0x98)][_0x875e6d(0xdd)][_0x875e6d(0xc7)](_0x21d9b4);}[_0x3563f4(0x84)](_0x34ed8e){const _0x521b7a=_0x3563f4;this[_0x521b7a(0x98)][_0x521b7a(0xdd)][_0x521b7a(0x84)](_0x34ed8e);}[_0x3563f4(0x115)](){const _0x4db0c7=_0x3563f4;this[_0x4db0c7(0x98)][_0x4db0c7(0xdd)][_0x4db0c7(0x115)]();}[_0x3563f4(0xf9)](){const _0x2c5749=_0x3563f4;this[_0x2c5749(0x98)][_0x2c5749(0xdd)][_0x2c5749(0xf9)]();}[_0x3563f4(0x8e)](_0x3725a8,_0xf8e643,_0x57e044){const _0x4392cf=_0x3563f4;this[_0x4392cf(0x98)][_0x4392cf(0xdd)][_0x4392cf(0x8e)](_0x3725a8,_0xf8e643,_0x57e044);}[_0x3563f4(0xb9)](){const _0x2ec29c=_0x3563f4;this[_0x2ec29c(0x98)][_0x2ec29c(0xdd)][_0x2ec29c(0xb9)](),this[_0x2ec29c(0x98)][_0x2ec29c(0xdd)][_0x2ec29c(0x10b)](this[_0x2ec29c(0x107)]());}[_0x3563f4(0xd9)](_0x5f106f){const _0x26f8e8=_0x3563f4;this[_0x26f8e8(0x98)][_0x26f8e8(0xdd)][_0x26f8e8(0xd9)](_0x5f106f);}[_0x3563f4(0xeb)](_0x59a133){const _0x394e9d=_0x3563f4;this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0xa4)](_0x59a133[_0x394e9d(0x9f)]),this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0xc0)](_0x59a133[_0x394e9d(0x75)]),this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0x10b)](this[_0x394e9d(0x107)](_0x59a133));}[_0x3563f4(0xd8)](_0x210b4d,_0x329264){const _0x5a779b=_0x3563f4;this[_0x5a779b(0x98)][_0x5a779b(0xdd)][_0x5a779b(0xe3)](_0x210b4d),_0x329264&&this[_0x5a779b(0x98)][_0x5a779b(0xdd)][_0x5a779b(0xdf)](!0x1);}[_0x3563f4(0x100)](_0x425108){const _0x2ea85d=_0x3563f4;this[_0x2ea85d(0xc4)]=_0x425108;}[_0x3563f4(0xae)](_0x176e97){const _0x2b7a5f=_0x3563f4;this[_0x2b7a5f(0x98)][_0x2b7a5f(0x111)][_0x2b7a5f(0xae)](_0x176e97);}[_0x3563f4(0x76)](){const _0x48f049=_0x3563f4;this[_0x48f049(0x101)](_0x404817(this[_0x48f049(0x70)][_0x48f049(0xbe)],_0x48f049(0xb2)));}[_0x3563f4(0x101)](_0x5d8152,_0x1d7e21=!0x1){const _0x4380cf=_0x3563f4;if(_0x1d7e21&&!_0x486b0f()&&_0x5d8152[_0x4380cf(0xcf)])return this[_0x4380cf(0x98)][_0x4380cf(0x91)][_0x4380cf(0x82)]='',void this[_0x4380cf(0xc9)](_0x5d8152);this[_0x4380cf(0x98)][_0x4380cf(0x91)][_0x4380cf(0x82)]=_0x5d8152;}[_0x3563f4(0xd6)](_0x6cf509){const _0x41ad85=_0x3563f4,_0x4c66b0=this[_0x41ad85(0x8b)](_0x6cf509);this[_0x41ad85(0x98)][_0x41ad85(0x111)][_0x41ad85(0xd6)](_0x4c66b0);}[_0x3563f4(0xc9)](_0x140578){const _0x4a47b7=_0x3563f4;let _0x427745=0x0;clearInterval(this[_0x4a47b7(0xb8)]),this[_0x4a47b7(0xb8)]=setInterval(()=>{const _0x335346=_0x4a47b7;this[_0x335346(0x98)][_0x335346(0x91)][_0x335346(0x82)]=this[_0x335346(0x98)][_0x335346(0x91)][_0x335346(0x82)]+_0x140578[_0x427745],_0x427745++,_0x427745===_0x140578[_0x335346(0xcf)]&&clearInterval(this[_0x335346(0xb8)]);},0x1e);}[_0x3563f4(0xf1)](_0x39d919){const _0x246323=_0x3563f4;this[_0x246323(0x98)][_0x246323(0x91)][_0x246323(0xd4)]=_0x39d919;}[_0x3563f4(0x8b)](_0x3ee2ae){const _0x363fbd=_0x3563f4;return _0x3ee2ae?_0x3ee2ae[_0x363fbd(0x9f)]&&_0x3ee2ae[_0x363fbd(0x75)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x83)):_0x3ee2ae[_0x363fbd(0x9f)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0xbd)):_0x3ee2ae[_0x363fbd(0x75)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x113)):_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x10c)):'';}[_0x3563f4(0x107)](_0x1cab42){const _0x456fb1=_0x3563f4;return _0x1cab42?_0x1cab42[_0x456fb1(0x9f)]&&_0x1cab42[_0x456fb1(0x75)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0xca)):_0x1cab42[_0x456fb1(0x9f)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x94)):_0x1cab42[_0x456fb1(0x75)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0xa7)):_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x10f)):_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x10f));}[_0x3563f4(0x8d)](_0x4af396,_0x4ac97d,_0x66695b,_0x2ea41f){const _0x890dc0=_0x3563f4;this[_0x890dc0(0x98)][_0x890dc0(0x8d)](_0x4af396,_0x4ac97d,_0x66695b,_0x2ea41f);}[_0x3563f4(0x90)](_0x149d9d){const _0x413ebf=_0x3563f4;this[_0x413ebf(0x98)][_0x413ebf(0x90)](_0x149d9d);}[_0x3563f4(0x7c)](){const _0xf80f6a=_0x3563f4;this[_0xf80f6a(0x98)][_0xf80f6a(0xdd)][_0xf80f6a(0x7c)]();}[_0x3563f4(0x8f)](_0x167568,_0x554ddd){const _0x3bb4b0=_0x3563f4;this[_0x3bb4b0(0x98)][_0x3bb4b0(0x111)][_0x3bb4b0(0x105)](_0x167568,_0x554ddd);}[_0x3563f4(0xdb)](){const _0x248ed6=_0x3563f4;this[_0x248ed6(0x98)][_0x248ed6(0x111)][_0x248ed6(0xdb)]();}[_0x3563f4(0xd2)](){const _0x3ed8e7=_0x3563f4;this[_0x3ed8e7(0x98)][_0x3ed8e7(0xdd)][_0x3ed8e7(0x73)]=!0x0;}[_0x3563f4(0x7f)](){const _0x3c3eec=_0x3563f4;this[_0x3c3eec(0x98)][_0x3c3eec(0xdd)][_0x3c3eec(0x73)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x328029=_0x18de;(function(_0x1970f0,_0x4796aa){const _0x26bea5=_0x18de,_0x70e460=_0x1970f0();while(!![]){try{const _0x53654f=parseInt(_0x26bea5(0x13b))/0x1+parseInt(_0x26bea5(0xf8))/0x2+parseInt(_0x26bea5(0xdc))/0x3*(parseInt(_0x26bea5(0xef))/0x4)+parseInt(_0x26bea5(0x137))/0x5+-parseInt(_0x26bea5(0x14c))/0x6*(-parseInt(_0x26bea5(0xd8))/0x7)+parseInt(_0x26bea5(0x156))/0x8+parseInt(_0x26bea5(0xf7))/0x9*(-parseInt(_0x26bea5(0xf9))/0xa);if(_0x53654f===_0x4796aa)break;else _0x70e460['push'](_0x70e460['shift']());}catch(_0x48c524){_0x70e460['push'](_0x70e460['shift']());}}}(_0x3177,0x4fac8));import{CKEditorError as _0x9e7702,ObservableMixin as _0x45dd7b,uid as _0x1f91d7}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x558573,AIContextTextResourceType as _0x26de67}from'../../aicore/model/aicontext.js';import{escape as _0x3b1600}from'es-toolkit/compat';function _0x3177(){const _0x2360d7=['all','_finishUploadOperation','addUrlToContext','populateFromMessage','1608712jhTQPq','ai-chat-resource-load-failed','HTML','abort','object','set','_createContextItemFromContent','Current\x20document','code','isHidden','contextItemLoadingEnded','contextItemAdded','stack','isSelectionInContext','start','removeSelectionFromContext','size','3702202wGJeNL','resourceStateChanged','addCurrentDocumentToContext','getId','39oVejZR','url','enabled','uploadFile','_addContextItem','attributes','length','urls','uploadDocument','removeFromContext','_ongoingUploadOperations','SELECTION','FILE','File','string','error','_removeContextItem','document','clearPendingContextItems','88524IkzoXy','uploadProgressChanged','current-document','hidden','ai-chat-file-upload-failed','end','mapContextItemsToRequestData','map','9tPBoWg','883578MQXZXY','16422660CZwLDe','ai-chat-document-upload-failed','getDocument','ai-chat-context-invalid-data','type','_connector','getSentContextItems','ai-chat-source-not-found','fetchDocument','file-','_ownerId','text/html','ai-chat-source-resources-load-failed','addContextOptionsChanged','from','_conversationContextItems','DOCUMENT','_startUploadOperation','URL','startsWith','ai-chat-resource-no-data','addSelectionToContext','_isResourceInContext','_findSourceIdsByResourceId','_pendingContextItems','loadSourceResources','forEach','_addContextOptionsState','content','ai-chat-url-upload-failed','getData','resources','sources','MARKDOWN','fire','_config','isCurrentDocumentInConversation','uploadUrl','addFilesToContext','isInContext','_finishContextItemLoading','_getCustomSourcesInitialState','message','resourceId','addToConversationContext','_setAddContextOptionsDefaultState','updateCurrentDocument','_convertTextResourceToFile','uiId','data','TEXT','sourceResourcesLoaded','init','selection','_updateResourceInContextState','label','url-','getResources','ai-request-aborted','filter','text/plain','ai-chat-context-unsupported-type','424930uqGFbl','files','find','name','424157Fnzbpi','contextItemRemoved','isCurrentDocumentInContext','push','_addToConversationContextItem','_toggleAddCurrentDocumentOptionVisibility','has','files-','_mapContextItemToRequestData','version','abortController','isReadOnly','object\x20with\x20content\x20and\x20type\x20properties','delete','get','getPendingContextItems','sessionId','6PwSKKE','text/markdown','addResourceToContext','_ongoingUploads','contextSent','values'];_0x3177=function(){return _0x2360d7;};return _0x3177();}import{errorsMap as _0x431612}from'../../errorsmap.js';function _0x18de(_0x390cf1,_0x3d3b35){const _0x317707=_0x3177();return _0x18de=function(_0x18de3d,_0x416491){_0x18de3d=_0x18de3d-0xd0;let _0x175e69=_0x317707[_0x18de3d];return _0x175e69;},_0x18de(_0x390cf1,_0x3d3b35);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x328029(0xd2),_0x328029(0x13c),_0x328029(0xd1),_0x328029(0x150),_0x328029(0xeb),_0x328029(0x106),_0x328029(0x12c),_0x328029(0xd9),_0x328029(0xf0)];export class AIChatContext extends _0x45dd7b(){[_0x328029(0xfe)];[_0x328029(0x11c)];[_0x328029(0x103)];constructor({connector:_0x19d7f1,config:_0x24d00d,ownerId:_0x386b14}){const _0x1212d6=_0x328029;super(),this[_0x1212d6(0xfe)]=_0x19d7f1,this[_0x1212d6(0x11c)]=_0x24d00d,this[_0x1212d6(0x103)]=_0x386b14;}[_0x328029(0x12d)](){const _0x528fbe=_0x328029;this[_0x528fbe(0x111)]=new Map(),this[_0x528fbe(0x108)]=new Map(),this[_0x528fbe(0x14f)]=new Map(),this[_0x528fbe(0xe6)]=new Map(),this[_0x528fbe(0x126)]();}[_0x328029(0x14a)](){const _0x3e9fff=_0x328029;return this[_0x3e9fff(0x111)];}async[_0x328029(0x155)](_0x488c13){const _0x427fa1=_0x328029,_0x5ad11a=await this[_0x427fa1(0x15c)](_0x488c13);return this[_0x427fa1(0x13f)](_0x5ad11a),_0x427fa1(0xf1)===_0x5ad11a[_0x427fa1(0x129)]&&this[_0x427fa1(0x140)](),_0x5ad11a;}async[_0x328029(0x15c)](_0x239e0d){const _0x52ec24=_0x328029;if(_0x239e0d[_0x52ec24(0xfd)]===_0x558573[_0x52ec24(0x109)]){const _0x4b8e3a=await this[_0x52ec24(0xfe)][_0x52ec24(0x101)](this[_0x52ec24(0x103)],_0x239e0d['id'])[_0x52ec24(0xfb)]();return{'id':_0x52ec24(0xf1),'uiId':_0x52ec24(0xf1),'label':_0x52ec24(0x15d),'type':_0x239e0d[_0x52ec24(0xfd)],'content':_0x4b8e3a[_0x52ec24(0x115)],'hidden':this[_0x52ec24(0x108)][_0x52ec24(0x141)](_0x52ec24(0xf1)),'version':_0x4b8e3a[_0x52ec24(0xe1)]?.[_0x52ec24(0x144)],'sessionId':_0x4b8e3a[_0x52ec24(0xe1)]?.[_0x52ec24(0x14b)]};}return{'id':_0x239e0d['id'],'uiId':_0x239e0d['id'],'label':_0x239e0d[_0x52ec24(0xe1)]?.[_0x52ec24(0x130)]||_0x239e0d[_0x52ec24(0x13a)]||_0x239e0d[_0x52ec24(0xdd)]||_0x239e0d['id'],'type':_0x239e0d[_0x52ec24(0xfd)],..._0x239e0d?.[_0x52ec24(0xe1)]?.[_0x52ec24(0x124)]?{'resourceId':_0x239e0d[_0x52ec24(0xe1)]?.[_0x52ec24(0x124)]}:{}};}[_0x328029(0xff)](){const _0x3fa13b=_0x328029;return new Map(this[_0x3fa13b(0x108)]);}[_0x328029(0xe5)](_0x4b09bd){const _0x4c6225=_0x328029,_0x56b343=this[_0x4c6225(0x111)][_0x4c6225(0x149)](_0x4b09bd);_0x56b343?.[_0x4c6225(0x146)]||this[_0x4c6225(0xec)](_0x4b09bd);}[_0x328029(0xee)](){const _0x2cfd62=_0x328029;if(0x0===this[_0x2cfd62(0x111)][_0x2cfd62(0xd7)])return;for(const _0x281deb of this[_0x2cfd62(0x111)][_0x2cfd62(0x151)]())this[_0x2cfd62(0xec)](_0x281deb[_0x2cfd62(0x129)]);const _0x11f564=this[_0x2cfd62(0x108)][_0x2cfd62(0x149)](_0x2cfd62(0xf1))||this[_0x2cfd62(0x111)][_0x2cfd62(0x149)](_0x2cfd62(0xf1));_0x11f564&&this[_0x2cfd62(0xe0)]({..._0x11f564,'isReadOnly':!0x0,'hidden':!0x0});}[_0x328029(0x125)](_0x265e5b){const _0x30dfcd=_0x328029;for(const _0x4d4c94 of _0x265e5b[_0x30dfcd(0x151)]())this[_0x30dfcd(0x13f)](_0x4d4c94);this[_0x30dfcd(0xee)](),this[_0x30dfcd(0x11b)](_0x30dfcd(0x150),{'contextItems':Array[_0x30dfcd(0x107)](this[_0x30dfcd(0xff)]()[_0x30dfcd(0x151)]())});}[_0x328029(0x13d)](){const _0x9212b8=_0x328029;return this[_0x9212b8(0x111)][_0x9212b8(0x141)](_0x9212b8(0xf1));}[_0x328029(0xd4)](){const _0x435128=_0x328029;return this[_0x435128(0x111)][_0x435128(0x141)](_0x435128(0x12e));}[_0x328029(0x11d)](){const _0x279cbf=_0x328029;return this[_0x279cbf(0x108)][_0x279cbf(0x141)](_0x279cbf(0xf1));}static[_0x328029(0xf5)](_0x122ab4){const _0x313ced=_0x328029;return Array[_0x313ced(0x107)](_0x122ab4[_0x313ced(0x151)]())[_0x313ced(0xf6)](_0x1863e4=>this[_0x313ced(0x143)](_0x1863e4))[_0x313ced(0x134)](_0x459969=>null!==_0x459969);}async[_0x328029(0x11f)](_0x160151,_0x236309,_0x1d1465=_0x558573[_0x328029(0xe8)]){const _0x47cd6f=_0x328029,_0x454644=_0x47cd6f(0x142)+_0x1f91d7();this[_0x47cd6f(0x10a)](_0x454644);try{await Promise[_0x47cd6f(0x152)](_0x160151[_0x47cd6f(0xf6)](async _0x265a77=>{const _0x393cf6=_0x47cd6f,_0x417fce=_0x393cf6(0x102)+_0x1f91d7(),_0x2a4bfd=_0x3b1600(_0x265a77[_0x393cf6(0x13a)]);try{this[_0x393cf6(0xe0)]({'type':_0x1d1465,'label':_0x236309?.[_0x393cf6(0x130)]||_0x2a4bfd,'uiId':_0x417fce,'resourceId':_0x236309?.[_0x393cf6(0x124)]},!0x0);const _0x1f5a15=this[_0x393cf6(0xfe)][_0x393cf6(0xdf)](this[_0x393cf6(0x103)],_0x265a77,_0x236309);this[_0x393cf6(0x14f)][_0x393cf6(0x15b)](_0x417fce,_0x1f5a15[_0x393cf6(0x145)]);const {id:_0x2949c2}=await _0x1f5a15[_0x393cf6(0xdb)]();this[_0x393cf6(0x14f)][_0x393cf6(0x148)](_0x417fce),this[_0x393cf6(0x121)]({'type':_0x1d1465,'id':_0x2949c2,'label':_0x236309?.[_0x393cf6(0x130)]||_0x2a4bfd,'uiId':_0x417fce,'resourceId':_0x236309?.[_0x393cf6(0x124)]},!0x1);}catch(_0x5f061a){this[_0x393cf6(0x14f)][_0x393cf6(0x148)](_0x417fce);if(!(_0x5f061a instanceof _0x9e7702&&_0x5f061a[_0x393cf6(0x123)][_0x393cf6(0x10c)](_0x393cf6(0x133)))){const _0x473ff9=_0x431612[_0x393cf6(0x149)](_0x5f061a[_0x393cf6(0x15e)])||_0x393cf6(0xf3),_0x55c76f=new _0x9e7702(_0x473ff9,null,{'fileName':_0x2a4bfd,..._0x5f061a});_0x55c76f[_0x393cf6(0xd3)]=_0x5f061a[_0x393cf6(0xd3)],this[_0x393cf6(0x11b)](_0x393cf6(0xeb),{'error':_0x55c76f});}this[_0x393cf6(0xec)](_0x417fce);}}));}finally{this[_0x47cd6f(0x153)](_0x454644);}}[_0x328029(0xda)](_0x2d8fd0){const _0x300689=_0x328029;if(this[_0x300689(0x13d)]())return;const _0x4bc1fb={'type':_0x558573[_0x300689(0x109)],'uiId':_0x300689(0xf1),'label':_0x2d8fd0,'isReadOnly':this[_0x300689(0x108)][_0x300689(0x141)](_0x300689(0xf1)),'hidden':this[_0x300689(0x108)][_0x300689(0x141)](_0x300689(0xf1))};this[_0x300689(0xe0)](_0x4bc1fb);}async[_0x328029(0x127)](_0x27ed3b,_0x467322,_0x2133ca,_0x29f726){const _0x41187=_0x328029,_0x5a3cf5=this[_0x41187(0x111)][_0x41187(0x149)](_0x41187(0xf1));if(_0x5a3cf5&&_0x27ed3b){_0x5a3cf5[_0x41187(0x12e)]=_0x29f726?_0x29f726[_0x41187(0xf6)](_0x46f580=>({'start':_0x46f580[_0x41187(0xd5)],'end':_0x46f580[_0x41187(0xf4)]})):[];try{if(_0x5a3cf5[_0x41187(0x144)]===_0x467322)return;const {id:_0x1ff82d}=await this[_0x41187(0xfe)][_0x41187(0xe4)](this[_0x41187(0x103)],_0x27ed3b,{'version':_0x467322,'sessionId':_0x2133ca})[_0x41187(0xdb)]();_0x5a3cf5['id']=_0x1ff82d,_0x5a3cf5[_0x41187(0x115)]=_0x27ed3b,_0x5a3cf5[_0x41187(0x144)]=_0x467322,_0x5a3cf5[_0x41187(0x14b)]=_0x2133ca;}catch(_0x3b2bf){const _0x55f1b3=new _0x9e7702(_0x41187(0xfa),null);_0x55f1b3[_0x41187(0xd3)]=_0x3b2bf[_0x41187(0xd3)],this[_0x41187(0x11b)](_0x41187(0xeb),{'error':_0x55f1b3});}}}[_0x328029(0x10e)](_0x100f82){const _0x12e799=_0x328029;this[_0x12e799(0xe0)]({'type':_0x558573[_0x12e799(0xe7)],'label':_0x100f82,'uiId':_0x12e799(0x12e),'content':_0x100f82});}[_0x328029(0xd6)](){const _0xfa50fe=_0x328029;this[_0xfa50fe(0xec)](_0xfa50fe(0x12e));}async[_0x328029(0x154)](_0x21cc9d,_0x4556ef){const _0x4a5478=_0x328029,_0xb635f4=_0x4a5478(0x131)+_0x1f91d7();this[_0x4a5478(0x10a)](_0xb635f4);const _0x25b629=_0x4a5478(0x131)+_0x1f91d7();try{this[_0x4a5478(0xe0)]({'type':_0x558573[_0x4a5478(0x10b)],'label':_0x4556ef?.[_0x4a5478(0x130)]||_0x21cc9d,'uiId':_0x25b629,'resourceId':_0x4556ef?.[_0x4a5478(0x124)]},!0x0);const _0x5a7df0=this[_0x4a5478(0xfe)][_0x4a5478(0x11e)](this[_0x4a5478(0x103)],_0x21cc9d,_0x4556ef);this[_0x4a5478(0x14f)][_0x4a5478(0x15b)](_0x25b629,_0x5a7df0[_0x4a5478(0x145)]);const {id:_0xf2ab11}=await _0x5a7df0[_0x4a5478(0xdb)]();this[_0x4a5478(0x14f)][_0x4a5478(0x148)](_0x25b629),this[_0x4a5478(0x121)]({'type':_0x558573[_0x4a5478(0x10b)],'id':_0xf2ab11,'label':_0x4556ef?.[_0x4a5478(0x130)]||_0x21cc9d,'uiId':_0x25b629,'resourceId':_0x4556ef?.[_0x4a5478(0x124)]},!0x1);}catch(_0x589515){this[_0x4a5478(0x14f)][_0x4a5478(0x148)](_0x25b629),(_0x589515[_0x4a5478(0x123)][_0x4a5478(0x10c)](_0x4a5478(0x133))||this[_0x4a5478(0x11b)](_0x4a5478(0xeb),{'error':new _0x9e7702(_0x4a5478(0x116),this,{'url':_0x21cc9d,'originalError':_0x589515}),'url':_0x21cc9d}),this[_0x4a5478(0xec)](_0x25b629));}finally{this[_0x4a5478(0x153)](_0xb635f4);}}async[_0x328029(0x112)](_0xfc85cb,_0x5b8e10,_0x41d45b){const _0x49c821=_0x328029,_0x56ed5e=this[_0x49c821(0x114)][_0x49c821(0x119)][_0x49c821(0x139)](_0x21f39c=>_0x21f39c['id']===_0xfc85cb);if(!_0x56ed5e)return this[_0x49c821(0x11b)](_0x49c821(0xeb),{'error':new _0x9e7702(_0x49c821(0x100),this,{'sourceId':_0xfc85cb}),'sourceId':_0xfc85cb}),[];try{const _0x5085f8=(await _0x56ed5e[_0x49c821(0x132)](_0x5b8e10))[_0x49c821(0xf6)](_0x3d63a3=>{const _0x3088f2=_0x49c821,_0x42b1b1=this[_0x3088f2(0x10f)](_0x3d63a3['id']);return{..._0x3d63a3,'isInContext':_0x42b1b1};});return _0x56ed5e[_0x49c821(0x118)]=_0x5085f8,this[_0x49c821(0x11b)](_0x49c821(0x12c),{'sourceId':_0xfc85cb,'source':_0x56ed5e,'resources':_0x5085f8,'uid':_0x41d45b}),_0x5085f8;}catch(_0x1c5ea7){return this[_0x49c821(0x11b)](_0x49c821(0xeb),{'error':new _0x9e7702(_0x49c821(0x105),this,{'sourceId':_0xfc85cb,'originalError':_0x1c5ea7}),'sourceId':_0xfc85cb,'sourceLabel':_0x56ed5e[_0x49c821(0x130)]}),[];}}async[_0x328029(0x14e)](_0x36c45f,_0x2b7f40){const _0x4743=_0x328029;if(this[_0x4743(0x10f)](_0x2b7f40['id']))return;let _0x795d29=_0x2b7f40[_0x4743(0x12a)];if(!_0x795d29&&_0x36c45f[_0x4743(0x117)])try{_0x795d29=await _0x36c45f[_0x4743(0x117)](_0x2b7f40['id']);}catch(_0x341e60){return void this[_0x4743(0x11b)](_0x4743(0xeb),{'error':new _0x9e7702(_0x4743(0x157),this,{'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id'],'originalError':_0x341e60}),'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']});}if(_0x795d29)switch(_0x2b7f40[_0x4743(0xfd)]){case _0x558573[_0x4743(0x10b)]:if(_0x4743(0xea)!=typeof _0x795d29)return void this[_0x4743(0x11b)](_0x4743(0xeb),{'error':new _0x9e7702(_0x4743(0xfc),this,{'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id'],'expectedType':_0x4743(0xea),'actualType':typeof _0x795d29}),'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']});await this[_0x4743(0x154)](_0x795d29,{'label':_0x2b7f40[_0x4743(0x130)],'resourceId':_0x2b7f40['id']});break;case _0x558573[_0x4743(0xe8)]:if(!(_0x795d29 instanceof File))return void this[_0x4743(0x11b)](_0x4743(0xeb),{'error':new _0x9e7702(_0x4743(0xfc),this,{'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id'],'expectedType':_0x4743(0xe9),'actualType':typeof _0x795d29}),'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']});await this[_0x4743(0x11f)]([_0x795d29],{'label':_0x2b7f40[_0x4743(0x130)],'resourceId':_0x2b7f40['id']});break;case _0x558573[_0x4743(0x12b)]:if(_0x4743(0x15a)!=typeof _0x795d29||!(_0x4743(0x115)in _0x795d29)||!(_0x4743(0xfd)in _0x795d29))return void this[_0x4743(0x11b)](_0x4743(0xeb),{'error':new _0x9e7702(_0x4743(0xfc),this,{'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id'],'expectedType':_0x4743(0x147),'actualType':typeof _0x795d29}),'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']});_0x795d29=AIChatContext[_0x4743(0x128)](_0x795d29,_0x2b7f40[_0x4743(0x130)]),await this[_0x4743(0x11f)]([_0x795d29],{'label':_0x2b7f40[_0x4743(0x130)],'resourceId':_0x2b7f40['id']},_0x558573[_0x4743(0x12b)]);break;default:this[_0x4743(0x11b)](_0x4743(0xeb),{'error':new _0x9e7702(_0x4743(0x136),this,{'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id'],'resourceType':_0x2b7f40[_0x4743(0xfd)]}),'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']});}else this[_0x4743(0x11b)](_0x4743(0xeb),{'error':new _0x9e7702(_0x4743(0x10d),this,{'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']}),'resourceId':_0x2b7f40['id'],'sourceId':_0x36c45f['id']});}static[_0x328029(0x128)](_0x5ddc72,_0x4d38c8){const _0xa547ee=_0x328029;switch(_0x5ddc72[_0xa547ee(0xfd)]){case _0x26de67[_0xa547ee(0x11a)]:return new File([_0x5ddc72[_0xa547ee(0x115)]],_0x4d38c8,{'type':_0xa547ee(0x14d)});case _0x26de67[_0xa547ee(0x158)]:return new File([_0x5ddc72[_0xa547ee(0x115)]],_0x4d38c8,{'type':_0xa547ee(0x104)});default:return new File([_0x5ddc72[_0xa547ee(0x115)]],_0x4d38c8,{'type':_0xa547ee(0x135)});}}static[_0x328029(0x143)](_0x41d732){const _0x1d6540=_0x328029;switch(_0x41d732[_0x1d6540(0xfd)]){case _0x558573[_0x1d6540(0xe8)]:return{'type':_0x558573[_0x1d6540(0xe8)],'id':_0x41d732['id']};case _0x558573[_0x1d6540(0x10b)]:return{'type':_0x558573[_0x1d6540(0x10b)],'id':_0x41d732['id']};case _0x558573[_0x1d6540(0x109)]:return{'type':_0x558573[_0x1d6540(0x109)],'id':_0x41d732['id'],..._0x41d732[_0x1d6540(0x12e)]?.[_0x1d6540(0xe2)]&&{'selection':_0x41d732[_0x1d6540(0x12e)]}};case _0x558573[_0x1d6540(0x12b)]:return{'type':_0x558573[_0x1d6540(0xe8)],'id':_0x41d732['id']};default:return null;}}[_0x328029(0xe0)](_0x8e1315,_0x3689a9=!0x1){const _0x25c0d1=_0x328029;if(this[_0x25c0d1(0x111)][_0x25c0d1(0x15b)](_0x8e1315[_0x25c0d1(0x129)],_0x8e1315),_0x8e1315[_0x25c0d1(0xf2)]||this[_0x25c0d1(0x11b)](_0x25c0d1(0xd2),{'contextItem':_0x8e1315,'isLoading':_0x3689a9}),_0x25c0d1(0xf1)===_0x8e1315[_0x25c0d1(0x129)]&&this[_0x25c0d1(0x140)](),_0x8e1315[_0x25c0d1(0x124)]){const _0xbc0c2b=this[_0x25c0d1(0x110)](_0x8e1315[_0x25c0d1(0x124)]);_0xbc0c2b&&_0xbc0c2b[_0x25c0d1(0x113)](_0x64505e=>{const _0x5d2841=_0x25c0d1;this[_0x5d2841(0x12f)](_0x64505e,_0x8e1315[_0x5d2841(0x124)],!0x0);});}}[_0x328029(0xec)](_0x524b33){const _0x1671b4=_0x328029,_0x2632bb=this[_0x1671b4(0x111)][_0x1671b4(0x149)](_0x524b33),_0x9d3c4c=this[_0x1671b4(0x14f)][_0x1671b4(0x149)](_0x524b33);if(_0x9d3c4c&&(_0x9d3c4c[_0x1671b4(0x159)](),this[_0x1671b4(0x14f)][_0x1671b4(0x148)](_0x524b33)),_0x2632bb?.[_0x1671b4(0x124)]){const _0x111510=this[_0x1671b4(0x110)](_0x2632bb[_0x1671b4(0x124)]);_0x111510&&_0x111510[_0x1671b4(0x113)](_0x17eb71=>{const _0x587937=_0x1671b4;this[_0x587937(0x12f)](_0x17eb71,_0x2632bb[_0x587937(0x124)],!0x1);});}this[_0x1671b4(0x111)][_0x1671b4(0x148)](_0x524b33),this[_0x1671b4(0x11b)](_0x1671b4(0x13c),{'uiId':_0x524b33,'type':_0x2632bb?.[_0x1671b4(0xfd)]}),_0x1671b4(0xf1)===_0x524b33&&this[_0x1671b4(0x140)]();}[_0x328029(0x121)](_0x4d3d29,_0x555a3e){const _0x51d026=_0x328029;if(this[_0x51d026(0x111)][_0x51d026(0x141)](_0x4d3d29[_0x51d026(0x129)])&&(this[_0x51d026(0x111)][_0x51d026(0x15b)](_0x4d3d29[_0x51d026(0x129)],_0x4d3d29),this[_0x51d026(0x11b)](_0x51d026(0xd1),{'contextItem':_0x4d3d29,'isLoading':_0x555a3e}),_0x4d3d29[_0x51d026(0x124)])){const _0x2e8397=this[_0x51d026(0x110)](_0x4d3d29[_0x51d026(0x124)]);_0x2e8397&&_0x2e8397[_0x51d026(0x113)](_0x18c406=>{const _0xe8f18d=_0x51d026;this[_0xe8f18d(0x12f)](_0x18c406,_0x4d3d29[_0xe8f18d(0x124)],!0x0);});}}[_0x328029(0x13f)](_0x46cc90){const _0x159f0e=_0x328029;this[_0x159f0e(0x108)][_0x159f0e(0x15b)](_0x46cc90[_0x159f0e(0x129)],_0x46cc90);}[_0x328029(0x126)](){const _0x342a7a=_0x328029;this[_0x342a7a(0x114)]={'document':{'enabled':!0x1!==this[_0x342a7a(0x11c)]?.[_0x342a7a(0xed)]?.[_0x342a7a(0xde)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x342a7a(0x11c)]?.[_0x342a7a(0xe3)]?.[_0x342a7a(0xde)]},'files':{'enabled':!0x1!==this[_0x342a7a(0x11c)]?.[_0x342a7a(0x138)]?.[_0x342a7a(0xde)]},'sources':this[_0x342a7a(0x122)]()},this[_0x342a7a(0x11b)](_0x342a7a(0x106),{'options':this[_0x342a7a(0x114)]});}[_0x328029(0x122)](){const _0x71cbbc=_0x328029;return this[_0x71cbbc(0x11c)]?.[_0x71cbbc(0x119)]?.[_0x71cbbc(0xf6)](_0x2f41be=>({..._0x2f41be,'resources':[]}))??[];}[_0x328029(0x140)](){const _0x5cd7ad=_0x328029,_0x338526=this[_0x5cd7ad(0x13d)]()||this[_0x5cd7ad(0x11d)]();this[_0x5cd7ad(0x114)][_0x5cd7ad(0xed)][_0x5cd7ad(0xd0)]=_0x338526,this[_0x5cd7ad(0x11b)](_0x5cd7ad(0x106),{'options':this[_0x5cd7ad(0x114)]});}[_0x328029(0x10f)](_0x4311fa){const _0x1e627c=_0x328029;for(const _0x242a2a of this[_0x1e627c(0x111)][_0x1e627c(0x151)]())if(_0x242a2a[_0x1e627c(0x124)]===_0x4311fa)return!0x0;for(const _0x23502a of this[_0x1e627c(0x108)][_0x1e627c(0x151)]())if(_0x23502a[_0x1e627c(0x124)]===_0x4311fa)return!0x0;return!0x1;}[_0x328029(0x110)](_0x5a91f9){const _0x23ebdb=_0x328029,_0x263a84=[];for(const _0x3619c9 of this[_0x23ebdb(0x114)][_0x23ebdb(0x119)]){_0x3619c9[_0x23ebdb(0x118)][_0x23ebdb(0x139)](_0x2d7990=>_0x2d7990['id']===_0x5a91f9)&&_0x263a84[_0x23ebdb(0x13e)](_0x3619c9['id']);}return 0x0===_0x263a84[_0x23ebdb(0xe2)]?null:_0x263a84;}[_0x328029(0x12f)](_0x19beec,_0x4d658f,_0xa8b99d){const _0x55eac0=_0x328029,_0x18d192=this[_0x55eac0(0x114)][_0x55eac0(0x119)][_0x55eac0(0x139)](_0x22992d=>_0x22992d['id']===_0x19beec);if(!_0x18d192)return;const _0x3bff72=_0x18d192[_0x55eac0(0x118)][_0x55eac0(0x139)](_0x14934d=>_0x14934d['id']===_0x4d658f);_0x3bff72&&(_0x3bff72[_0x55eac0(0x120)]=_0xa8b99d,this[_0x55eac0(0x11b)](_0x55eac0(0xd9),{'sourceId':_0x19beec,'resourceId':_0x4d658f,'isInContext':_0xa8b99d}));}[_0x328029(0x10a)](_0x5509ea){const _0x55cadc=_0x328029;this[_0x55cadc(0xe6)][_0x55cadc(0x15b)](_0x5509ea,!0x0),this[_0x55cadc(0xe6)][_0x55cadc(0xd7)]&&this[_0x55cadc(0x11b)](_0x55cadc(0xf0),{'isUploadInProgress':!0x0});}[_0x328029(0x153)](_0x37b479){const _0x4d90a1=_0x328029;this[_0x4d90a1(0xe6)][_0x4d90a1(0x148)](_0x37b479),0x0===this[_0x4d90a1(0xe6)][_0x4d90a1(0xd7)]&&this[_0x4d90a1(0x11b)](_0x4d90a1(0xf0),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
const _0xfc34d3=_0x4647;(function(_0x27f06f,_0x487c1c){const _0x443465=_0x4647,_0x53b66b=_0x27f06f();while(!![]){try{const _0xfdb75c=-parseInt(_0x443465(0xf0))/0x1+parseInt(_0x443465(0xb5))/0x2*(parseInt(_0x443465(0xde))/0x3)+parseInt(_0x443465(0xc9))/0x4*(parseInt(_0x443465(0x69))/0x5)+parseInt(_0x443465(0x9d))/0x6+parseInt(_0x443465(0x6f))/0x7+parseInt(_0x443465(0x71))/0x8+-parseInt(_0x443465(0xdd))/0x9;if(_0xfdb75c===_0x487c1c)break;else _0x53b66b['push'](_0x53b66b['shift']());}catch(_0x537854){_0x53b66b['push'](_0x53b66b['shift']());}}}(_0x1a1a,0xf32da));import{CKEditorError as _0xef393d,ObservableMixin as _0x3555f4,uid as _0x37f04c}from'ckeditor5/src/utils.js';function _0x4647(_0x5d0c54,_0x12ad98){const _0x1a1a9b=_0x1a1a();return _0x4647=function(_0x464708,_0x5a656a){_0x464708=_0x464708-0x65;let _0x4daf4b=_0x1a1a9b[_0x464708];return _0x4daf4b;},_0x4647(_0x5d0c54,_0x12ad98);}import{AIContextItemType as _0x28b210,AIContextTextResourceType as _0x8c66f6}from'../../aicore/model/aicontext.js';import{escape as _0x34a956}from'es-toolkit/compat';import{errorsMap as _0x187db4}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xfc34d3(0xea),_0xfc34d3(0x6d),_0xfc34d3(0xb4),_0xfc34d3(0xd3),_0xfc34d3(0xed),_0xfc34d3(0xbb),_0xfc34d3(0xe5),_0xfc34d3(0x70),_0xfc34d3(0x86)];function _0x1a1a(){const _0x22d3de=['version','delete','string','clearPendingContextItems','enabled','FILE','_createContextItemFromContent','_connector','URL','init','_finishUploadOperation','_isResourceInContext','message','end','current-document','277716oIJPjx','uploadDocument','urls','removeFromContext','_getCustomSourcesInitialState','values','isHidden','ai-chat-document-upload-failed','_conversationContextItems','abort','SELECTION','get','populateFromMessage','ai-chat-source-resources-load-failed','ai-chat-context-unsupported-type','DOCUMENT','document','url','getSentContextItems','_removeContextItem','_convertTextResourceToFile','_pendingContextItems','start','contextItemLoadingEnded','4QwaLiI','ai-chat-source-not-found','content','label','ai-chat-resource-load-failed','_addToConversationContextItem','addContextOptionsChanged','addResourceToContext','ai-chat-resource-no-data','ai-request-aborted','push','uiId','_ongoingUploadOperations','ai-chat-url-upload-failed','TEXT','File','text/markdown','getId','text/plain','abortController','5188ftIWqf','name','isCurrentDocumentInContext','_addContextItem','object\x20with\x20content\x20and\x20type\x20properties','code','fire','_addContextOptionsState','sources','_startUploadOperation','contextSent','_finishContextItemLoading','hidden','all','_config','files-','ai-chat-file-upload-failed','isSelectionInContext','addToConversationContext','getResources','6778080lPRVSJ','1584309rwpAuY','_ownerId','length','files','mapContextItemsToRequestData','stack','ai-chat-context-invalid-data','sourceResourcesLoaded','url-','_findSourceIdsByResourceId','addSelectionToContext','resources','contextItemAdded','size','getData','error','Current\x20document','addUrlToContext','1598626RWwQwL','addCurrentDocumentToContext','_mapContextItemToRequestData','sessionId','getDocument','updateCurrentDocument','isCurrentDocumentInConversation','1995qGDJDs','uploadFile','uploadUrl','filter','contextItemRemoved','getPendingContextItems','4852330FiVDYZ','resourceStateChanged','8276952yNcFmG','text/html','removeSelectionFromContext','HTML','MARKDOWN','isReadOnly','set','has','addFilesToContext','attributes','file-','resourceId','from','find','loadSourceResources','_updateResourceInContextState','map','type','selection','object','_ongoingUploads','uploadProgressChanged','fetchDocument','_toggleAddCurrentDocumentOptionVisibility','startsWith','_setAddContextOptionsDefaultState','data','isInContext','forEach'];_0x1a1a=function(){return _0x22d3de;};return _0x1a1a();}export class AIChatContext extends _0x3555f4(){[_0xfc34d3(0x95)];[_0xfc34d3(0xd7)];[_0xfc34d3(0xdf)];constructor({connector:_0x8bf444,config:_0x25f9ab,ownerId:_0x3c8784}){const _0x409335=_0xfc34d3;super(),this[_0x409335(0x95)]=_0x8bf444,this[_0x409335(0xd7)]=_0x25f9ab,this[_0x409335(0xdf)]=_0x3c8784;}[_0xfc34d3(0x97)](){const _0x4408ef=_0xfc34d3;this[_0x4408ef(0xb2)]=new Map(),this[_0x4408ef(0xa5)]=new Map(),this[_0x4408ef(0x85)]=new Map(),this[_0x4408ef(0xc1)]=new Map(),this[_0x4408ef(0x8a)]();}[_0xfc34d3(0x6e)](){const _0x693fd9=_0xfc34d3;return this[_0x693fd9(0xb2)];}async[_0xfc34d3(0xa9)](_0x546671){const _0x5c47ce=_0xfc34d3,_0x3d1063=await this[_0x5c47ce(0x94)](_0x546671);return this[_0x5c47ce(0xba)](_0x3d1063),_0x5c47ce(0x9c)===_0x3d1063[_0x5c47ce(0xc0)]&&this[_0x5c47ce(0x88)](),_0x3d1063;}async[_0xfc34d3(0x94)](_0x22a74f){const _0x5f2c66=_0xfc34d3;if(_0x22a74f[_0x5f2c66(0x82)]===_0x28b210[_0x5f2c66(0xac)]){const _0x3737c8=await this[_0x5f2c66(0x95)][_0x5f2c66(0x87)](this[_0x5f2c66(0xdf)],_0x22a74f['id'])[_0x5f2c66(0x66)]();return{'id':_0x5f2c66(0x9c),'uiId':_0x5f2c66(0x9c),'label':_0x5f2c66(0xee),'type':_0x22a74f[_0x5f2c66(0x82)],'content':_0x3737c8[_0x5f2c66(0xb7)],'hidden':this[_0x5f2c66(0xa5)][_0x5f2c66(0x78)](_0x5f2c66(0x9c)),'version':_0x3737c8[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x8e)],'sessionId':_0x3737c8[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x65)]};}return{'id':_0x22a74f['id'],'uiId':_0x22a74f['id'],'label':_0x22a74f[_0x5f2c66(0x7a)]?.[_0x5f2c66(0xb8)]||_0x22a74f[_0x5f2c66(0xca)]||_0x22a74f[_0x5f2c66(0xae)]||_0x22a74f['id'],'type':_0x22a74f[_0x5f2c66(0x82)],..._0x22a74f?.[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x7c)]?{'resourceId':_0x22a74f[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x7c)]}:{}};}[_0xfc34d3(0xaf)](){const _0x3a790c=_0xfc34d3;return new Map(this[_0x3a790c(0xa5)]);}[_0xfc34d3(0xa0)](_0x58be4f){const _0x2109c6=_0xfc34d3,_0x2f3e7b=this[_0x2109c6(0xb2)][_0x2109c6(0xa8)](_0x58be4f);_0x2f3e7b?.[_0x2109c6(0x76)]||this[_0x2109c6(0xb0)](_0x58be4f);}[_0xfc34d3(0x91)](){const _0x4ffb56=_0xfc34d3;if(0x0===this[_0x4ffb56(0xb2)][_0x4ffb56(0xeb)])return;for(const _0x5bd1b0 of this[_0x4ffb56(0xb2)][_0x4ffb56(0xa2)]())this[_0x4ffb56(0xb0)](_0x5bd1b0[_0x4ffb56(0xc0)]);const _0x2ed4af=this[_0x4ffb56(0xa5)][_0x4ffb56(0xa8)](_0x4ffb56(0x9c))||this[_0x4ffb56(0xb2)][_0x4ffb56(0xa8)](_0x4ffb56(0x9c));_0x2ed4af&&this[_0x4ffb56(0xcc)]({..._0x2ed4af,'isReadOnly':!0x0,'hidden':!0x0});}[_0xfc34d3(0xdb)](_0x5c9b50){const _0xbf9981=_0xfc34d3;for(const _0x4be6ba of _0x5c9b50[_0xbf9981(0xa2)]())this[_0xbf9981(0xba)](_0x4be6ba);this[_0xbf9981(0x91)](),this[_0xbf9981(0xcf)](_0xbf9981(0xd3),{'contextItems':Array[_0xbf9981(0x7d)](this[_0xbf9981(0xaf)]()[_0xbf9981(0xa2)]())});}[_0xfc34d3(0xcb)](){const _0x1d4608=_0xfc34d3;return this[_0x1d4608(0xb2)][_0x1d4608(0x78)](_0x1d4608(0x9c));}[_0xfc34d3(0xda)](){const _0x2bb13d=_0xfc34d3;return this[_0x2bb13d(0xb2)][_0x2bb13d(0x78)](_0x2bb13d(0x83));}[_0xfc34d3(0x68)](){const _0x231c5c=_0xfc34d3;return this[_0x231c5c(0xa5)][_0x231c5c(0x78)](_0x231c5c(0x9c));}static[_0xfc34d3(0xe2)](_0x792a44){const _0x4b4ffd=_0xfc34d3;return Array[_0x4b4ffd(0x7d)](_0x792a44[_0x4b4ffd(0xa2)]())[_0x4b4ffd(0x81)](_0x487d72=>this[_0x4b4ffd(0xf2)](_0x487d72))[_0x4b4ffd(0x6c)](_0x59411a=>null!==_0x59411a);}async[_0xfc34d3(0x79)](_0x1e2b1d,_0xb81786,_0x217af7=_0x28b210[_0xfc34d3(0x93)]){const _0x486300=_0xfc34d3,_0x5af839=_0x486300(0xd8)+_0x37f04c();this[_0x486300(0xd2)](_0x5af839);try{await Promise[_0x486300(0xd6)](_0x1e2b1d[_0x486300(0x81)](async _0x420c82=>{const _0x166d57=_0x486300,_0x4de900=_0x166d57(0x7b)+_0x37f04c(),_0x38e015=_0x34a956(_0x420c82[_0x166d57(0xca)]);try{this[_0x166d57(0xcc)]({'type':_0x217af7,'label':_0xb81786?.[_0x166d57(0xb8)]||_0x38e015,'uiId':_0x4de900,'resourceId':_0xb81786?.[_0x166d57(0x7c)]},!0x0);const _0x5228b2=this[_0x166d57(0x95)][_0x166d57(0x6a)](this[_0x166d57(0xdf)],_0x420c82,_0xb81786);this[_0x166d57(0x85)][_0x166d57(0x77)](_0x4de900,_0x5228b2[_0x166d57(0xc8)]);const {id:_0x40794e}=await _0x5228b2[_0x166d57(0xc6)]();this[_0x166d57(0x85)][_0x166d57(0x8f)](_0x4de900),this[_0x166d57(0xd4)]({'type':_0x217af7,'id':_0x40794e,'label':_0xb81786?.[_0x166d57(0xb8)]||_0x38e015,'uiId':_0x4de900,'resourceId':_0xb81786?.[_0x166d57(0x7c)]},!0x1);}catch(_0xb486c3){this[_0x166d57(0x85)][_0x166d57(0x8f)](_0x4de900);if(!(_0xb486c3 instanceof _0xef393d&&_0xb486c3[_0x166d57(0x9a)][_0x166d57(0x89)](_0x166d57(0xbe)))){const _0x1be6df=_0x187db4[_0x166d57(0xa8)](_0xb486c3[_0x166d57(0xce)])||_0x166d57(0xd9),_0x3797d6=new _0xef393d(_0x1be6df,null,{'fileName':_0x38e015,..._0xb486c3});_0x3797d6[_0x166d57(0xe3)]=_0xb486c3[_0x166d57(0xe3)],this[_0x166d57(0xcf)](_0x166d57(0xed),{'error':_0x3797d6});}this[_0x166d57(0xb0)](_0x4de900);}}));}finally{this[_0x486300(0x98)](_0x5af839);}}[_0xfc34d3(0xf1)](_0xd61738){const _0xce36db=_0xfc34d3;if(this[_0xce36db(0xcb)]())return;const _0x1433f7={'type':_0x28b210[_0xce36db(0xac)],'uiId':_0xce36db(0x9c),'label':_0xd61738,'isReadOnly':this[_0xce36db(0xa5)][_0xce36db(0x78)](_0xce36db(0x9c)),'hidden':this[_0xce36db(0xa5)][_0xce36db(0x78)](_0xce36db(0x9c))};this[_0xce36db(0xcc)](_0x1433f7);}async[_0xfc34d3(0x67)](_0x5dd444,_0x5ce53e,_0x160b18,_0x6c6077){const _0x46354a=_0xfc34d3,_0x5346a8=this[_0x46354a(0xb2)][_0x46354a(0xa8)](_0x46354a(0x9c));if(_0x5346a8&&_0x5dd444){_0x5346a8[_0x46354a(0x83)]=_0x6c6077?_0x6c6077[_0x46354a(0x81)](_0x36da61=>({'start':_0x36da61[_0x46354a(0xb3)],'end':_0x36da61[_0x46354a(0x9b)]})):[];try{if(_0x5346a8[_0x46354a(0x8e)]===_0x5ce53e)return;const {id:_0x2b4459}=await this[_0x46354a(0x95)][_0x46354a(0x9e)](this[_0x46354a(0xdf)],_0x5dd444,{'version':_0x5ce53e,'sessionId':_0x160b18})[_0x46354a(0xc6)]();_0x5346a8['id']=_0x2b4459,_0x5346a8[_0x46354a(0xb7)]=_0x5dd444,_0x5346a8[_0x46354a(0x8e)]=_0x5ce53e,_0x5346a8[_0x46354a(0x65)]=_0x160b18;}catch(_0x34c69a){const _0x9fc1d1=new _0xef393d(_0x46354a(0xa4),null);_0x9fc1d1[_0x46354a(0xe3)]=_0x34c69a[_0x46354a(0xe3)],this[_0x46354a(0xcf)](_0x46354a(0xed),{'error':_0x9fc1d1});}}}[_0xfc34d3(0xe8)](_0x1725d8){const _0x49fc42=_0xfc34d3;this[_0x49fc42(0xcc)]({'type':_0x28b210[_0x49fc42(0xa7)],'label':_0x1725d8,'uiId':_0x49fc42(0x83),'content':_0x1725d8});}[_0xfc34d3(0x73)](){const _0x2ec8c1=_0xfc34d3;this[_0x2ec8c1(0xb0)](_0x2ec8c1(0x83));}async[_0xfc34d3(0xef)](_0x3304e7,_0x3709f4){const _0x36541d=_0xfc34d3,_0x1154b4=_0x36541d(0xe6)+_0x37f04c();this[_0x36541d(0xd2)](_0x1154b4);const _0xc25206=_0x36541d(0xe6)+_0x37f04c();try{this[_0x36541d(0xcc)]({'type':_0x28b210[_0x36541d(0x96)],'label':_0x3709f4?.[_0x36541d(0xb8)]||_0x3304e7,'uiId':_0xc25206,'resourceId':_0x3709f4?.[_0x36541d(0x7c)]},!0x0);const _0x1f1227=this[_0x36541d(0x95)][_0x36541d(0x6b)](this[_0x36541d(0xdf)],_0x3304e7,_0x3709f4);this[_0x36541d(0x85)][_0x36541d(0x77)](_0xc25206,_0x1f1227[_0x36541d(0xc8)]);const {id:_0x3c217e}=await _0x1f1227[_0x36541d(0xc6)]();this[_0x36541d(0x85)][_0x36541d(0x8f)](_0xc25206),this[_0x36541d(0xd4)]({'type':_0x28b210[_0x36541d(0x96)],'id':_0x3c217e,'label':_0x3709f4?.[_0x36541d(0xb8)]||_0x3304e7,'uiId':_0xc25206,'resourceId':_0x3709f4?.[_0x36541d(0x7c)]},!0x1);}catch(_0x3d1dbf){this[_0x36541d(0x85)][_0x36541d(0x8f)](_0xc25206),(_0x3d1dbf[_0x36541d(0x9a)][_0x36541d(0x89)](_0x36541d(0xbe))||this[_0x36541d(0xcf)](_0x36541d(0xed),{'error':new _0xef393d(_0x36541d(0xc2),this,{'url':_0x3304e7,'originalError':_0x3d1dbf}),'url':_0x3304e7}),this[_0x36541d(0xb0)](_0xc25206));}finally{this[_0x36541d(0x98)](_0x1154b4);}}async[_0xfc34d3(0x7f)](_0x48ccd0,_0x1de832,_0x3dac8a){const _0x3f9bb1=_0xfc34d3,_0x736164=this[_0x3f9bb1(0xd0)][_0x3f9bb1(0xd1)][_0x3f9bb1(0x7e)](_0x4ef5c3=>_0x4ef5c3['id']===_0x48ccd0);if(!_0x736164)return this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xed),{'error':new _0xef393d(_0x3f9bb1(0xb6),this,{'sourceId':_0x48ccd0}),'sourceId':_0x48ccd0}),[];try{const _0x5d865b=(await _0x736164[_0x3f9bb1(0xdc)](_0x1de832))[_0x3f9bb1(0x81)](_0x458f8f=>{const _0x2c1570=_0x3f9bb1,_0x4c491b=this[_0x2c1570(0x99)](_0x458f8f['id']);return{..._0x458f8f,'isInContext':_0x4c491b};});return _0x736164[_0x3f9bb1(0xe9)]=_0x5d865b,this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xe5),{'sourceId':_0x48ccd0,'source':_0x736164,'resources':_0x5d865b,'uid':_0x3dac8a}),_0x5d865b;}catch(_0x738c75){return this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xed),{'error':new _0xef393d(_0x3f9bb1(0xaa),this,{'sourceId':_0x48ccd0,'originalError':_0x738c75}),'sourceId':_0x48ccd0,'sourceLabel':_0x736164[_0x3f9bb1(0xb8)]}),[];}}async[_0xfc34d3(0xbc)](_0x5bebce,_0x279d63){const _0x14a9c6=_0xfc34d3;if(this[_0x14a9c6(0x99)](_0x279d63['id']))return;let _0x1fe7db=_0x279d63[_0x14a9c6(0x8b)];if(!_0x1fe7db&&_0x5bebce[_0x14a9c6(0xec)])try{_0x1fe7db=await _0x5bebce[_0x14a9c6(0xec)](_0x279d63['id']);}catch(_0x3afa41){return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xb9),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'originalError':_0x3afa41}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}if(_0x1fe7db)switch(_0x279d63[_0x14a9c6(0x82)]){case _0x28b210[_0x14a9c6(0x96)]:if(_0x14a9c6(0x90)!=typeof _0x1fe7db)return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0x90),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});await this[_0x14a9c6(0xef)](_0x1fe7db,{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']});break;case _0x28b210[_0x14a9c6(0x93)]:if(!(_0x1fe7db instanceof File))return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0xc4),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});await this[_0x14a9c6(0x79)]([_0x1fe7db],{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']});break;case _0x28b210[_0x14a9c6(0xc3)]:if(_0x14a9c6(0x84)!=typeof _0x1fe7db||!(_0x14a9c6(0xb7)in _0x1fe7db)||!(_0x14a9c6(0x82)in _0x1fe7db))return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0xcd),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});_0x1fe7db=AIChatContext[_0x14a9c6(0xb1)](_0x1fe7db,_0x279d63[_0x14a9c6(0xb8)]),await this[_0x14a9c6(0x79)]([_0x1fe7db],{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']},_0x28b210[_0x14a9c6(0xc3)]);break;default:this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xab),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'resourceType':_0x279d63[_0x14a9c6(0x82)]}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}else this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xbd),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}static[_0xfc34d3(0xb1)](_0xe57dfb,_0x1c4160){const _0x5f1fb7=_0xfc34d3;switch(_0xe57dfb[_0x5f1fb7(0x82)]){case _0x8c66f6[_0x5f1fb7(0x75)]:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0xc5)});case _0x8c66f6[_0x5f1fb7(0x74)]:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0x72)});default:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0xc7)});}}static[_0xfc34d3(0xf2)](_0x586b12){const _0x54ec2e=_0xfc34d3;switch(_0x586b12[_0x54ec2e(0x82)]){case _0x28b210[_0x54ec2e(0x93)]:return{'type':_0x28b210[_0x54ec2e(0x93)],'id':_0x586b12['id']};case _0x28b210[_0x54ec2e(0x96)]:return{'type':_0x28b210[_0x54ec2e(0x96)],'id':_0x586b12['id']};case _0x28b210[_0x54ec2e(0xac)]:return{'type':_0x28b210[_0x54ec2e(0xac)],'id':_0x586b12['id'],..._0x586b12[_0x54ec2e(0x83)]?.[_0x54ec2e(0xe0)]&&{'selection':_0x586b12[_0x54ec2e(0x83)]}};case _0x28b210[_0x54ec2e(0xc3)]:return{'type':_0x28b210[_0x54ec2e(0x93)],'id':_0x586b12['id']};default:return null;}}[_0xfc34d3(0xcc)](_0x312b6f,_0xc0d646=!0x1){const _0x764e3=_0xfc34d3;if(this[_0x764e3(0xb2)][_0x764e3(0x77)](_0x312b6f[_0x764e3(0xc0)],_0x312b6f),_0x312b6f[_0x764e3(0xd5)]||this[_0x764e3(0xcf)](_0x764e3(0xea),{'contextItem':_0x312b6f,'isLoading':_0xc0d646}),_0x764e3(0x9c)===_0x312b6f[_0x764e3(0xc0)]&&this[_0x764e3(0x88)](),_0x312b6f[_0x764e3(0x7c)]){const _0x2ba9d3=this[_0x764e3(0xe7)](_0x312b6f[_0x764e3(0x7c)]);_0x2ba9d3&&_0x2ba9d3[_0x764e3(0x8d)](_0x76d7dc=>{const _0x2b9eb3=_0x764e3;this[_0x2b9eb3(0x80)](_0x76d7dc,_0x312b6f[_0x2b9eb3(0x7c)],!0x0);});}}[_0xfc34d3(0xb0)](_0x105c7e){const _0x4e8fa4=_0xfc34d3,_0x1235a7=this[_0x4e8fa4(0xb2)][_0x4e8fa4(0xa8)](_0x105c7e),_0x373b21=this[_0x4e8fa4(0x85)][_0x4e8fa4(0xa8)](_0x105c7e);if(_0x373b21&&(_0x373b21[_0x4e8fa4(0xa6)](),this[_0x4e8fa4(0x85)][_0x4e8fa4(0x8f)](_0x105c7e)),_0x1235a7?.[_0x4e8fa4(0x7c)]){const _0x592b0f=this[_0x4e8fa4(0xe7)](_0x1235a7[_0x4e8fa4(0x7c)]);_0x592b0f&&_0x592b0f[_0x4e8fa4(0x8d)](_0x1b417b=>{const _0x1fbd0f=_0x4e8fa4;this[_0x1fbd0f(0x80)](_0x1b417b,_0x1235a7[_0x1fbd0f(0x7c)],!0x1);});}this[_0x4e8fa4(0xb2)][_0x4e8fa4(0x8f)](_0x105c7e),this[_0x4e8fa4(0xcf)](_0x4e8fa4(0x6d),{'uiId':_0x105c7e,'type':_0x1235a7?.[_0x4e8fa4(0x82)]}),_0x4e8fa4(0x9c)===_0x105c7e&&this[_0x4e8fa4(0x88)]();}[_0xfc34d3(0xd4)](_0x4cb770,_0xaaa9cc){const _0x48f07e=_0xfc34d3;if(this[_0x48f07e(0xb2)][_0x48f07e(0x78)](_0x4cb770[_0x48f07e(0xc0)])&&(this[_0x48f07e(0xb2)][_0x48f07e(0x77)](_0x4cb770[_0x48f07e(0xc0)],_0x4cb770),this[_0x48f07e(0xcf)](_0x48f07e(0xb4),{'contextItem':_0x4cb770,'isLoading':_0xaaa9cc}),_0x4cb770[_0x48f07e(0x7c)])){const _0x5074c7=this[_0x48f07e(0xe7)](_0x4cb770[_0x48f07e(0x7c)]);_0x5074c7&&_0x5074c7[_0x48f07e(0x8d)](_0x1ed1d1=>{const _0x4005be=_0x48f07e;this[_0x4005be(0x80)](_0x1ed1d1,_0x4cb770[_0x4005be(0x7c)],!0x0);});}}[_0xfc34d3(0xba)](_0x5a6182){const _0x56f6af=_0xfc34d3;this[_0x56f6af(0xa5)][_0x56f6af(0x77)](_0x5a6182[_0x56f6af(0xc0)],_0x5a6182);}[_0xfc34d3(0x8a)](){const _0x597c89=_0xfc34d3;this[_0x597c89(0xd0)]={'document':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0xad)]?.[_0x597c89(0x92)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0x9f)]?.[_0x597c89(0x92)]},'files':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0xe1)]?.[_0x597c89(0x92)]},'sources':this[_0x597c89(0xa1)]()},this[_0x597c89(0xcf)](_0x597c89(0xbb),{'options':this[_0x597c89(0xd0)]});}[_0xfc34d3(0xa1)](){const _0x1c7044=_0xfc34d3;return this[_0x1c7044(0xd7)]?.[_0x1c7044(0xd1)]?.[_0x1c7044(0x81)](_0x1d7532=>({..._0x1d7532,'resources':[]}))??[];}[_0xfc34d3(0x88)](){const _0x1a7b0c=_0xfc34d3,_0x50d055=this[_0x1a7b0c(0xcb)]()||this[_0x1a7b0c(0x68)]();this[_0x1a7b0c(0xd0)][_0x1a7b0c(0xad)][_0x1a7b0c(0xa3)]=_0x50d055,this[_0x1a7b0c(0xcf)](_0x1a7b0c(0xbb),{'options':this[_0x1a7b0c(0xd0)]});}[_0xfc34d3(0x99)](_0x19876b){const _0x572b03=_0xfc34d3;for(const _0x520ebe of this[_0x572b03(0xb2)][_0x572b03(0xa2)]())if(_0x520ebe[_0x572b03(0x7c)]===_0x19876b)return!0x0;for(const _0x112381 of this[_0x572b03(0xa5)][_0x572b03(0xa2)]())if(_0x112381[_0x572b03(0x7c)]===_0x19876b)return!0x0;return!0x1;}[_0xfc34d3(0xe7)](_0xc04bf0){const _0x346fc5=_0xfc34d3,_0x39c511=[];for(const _0x5b9e8d of this[_0x346fc5(0xd0)][_0x346fc5(0xd1)]){_0x5b9e8d[_0x346fc5(0xe9)][_0x346fc5(0x7e)](_0x482af6=>_0x482af6['id']===_0xc04bf0)&&_0x39c511[_0x346fc5(0xbf)](_0x5b9e8d['id']);}return 0x0===_0x39c511[_0x346fc5(0xe0)]?null:_0x39c511;}[_0xfc34d3(0x80)](_0x4a1159,_0x1ebbc3,_0x57850b){const _0x461fbc=_0xfc34d3,_0x471c41=this[_0x461fbc(0xd0)][_0x461fbc(0xd1)][_0x461fbc(0x7e)](_0x5f34cf=>_0x5f34cf['id']===_0x4a1159);if(!_0x471c41)return;const _0x56c35d=_0x471c41[_0x461fbc(0xe9)][_0x461fbc(0x7e)](_0x897d4e=>_0x897d4e['id']===_0x1ebbc3);_0x56c35d&&(_0x56c35d[_0x461fbc(0x8c)]=_0x57850b,this[_0x461fbc(0xcf)](_0x461fbc(0x70),{'sourceId':_0x4a1159,'resourceId':_0x1ebbc3,'isInContext':_0x57850b}));}[_0xfc34d3(0xd2)](_0x2ec922){const _0x3f72aa=_0xfc34d3;this[_0x3f72aa(0xc1)][_0x3f72aa(0x77)](_0x2ec922,!0x0),this[_0x3f72aa(0xc1)][_0x3f72aa(0xeb)]&&this[_0x3f72aa(0xcf)](_0x3f72aa(0x86),{'isUploadInProgress':!0x0});}[_0xfc34d3(0x98)](_0x280603){const _0x47db40=_0xfc34d3;this[_0x47db40(0xc1)][_0x47db40(0x8f)](_0x280603),0x0===this[_0x47db40(0xc1)][_0x47db40(0xeb)]&&this[_0x47db40(0xcf)](_0x47db40(0x86),{'isUploadInProgress':!0x1});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2918e4=_0x1fb5;(function(_0x154c83,_0x572e8a){const _0x81527c=_0x1fb5,_0x4505b5=_0x154c83();while(!![]){try{const _0x5dbff6=-parseInt(_0x81527c(0x146))/0x1*(-parseInt(_0x81527c(0x12b))/0x2)+-parseInt(_0x81527c(0x17d))/0x3*(-parseInt(_0x81527c(0x11e))/0x4)+parseInt(_0x81527c(0x16c))/0x5*(parseInt(_0x81527c(0x13f))/0x6)+-parseInt(_0x81527c(0x148))/0x7+parseInt(_0x81527c(0x15e))/0x8*(-parseInt(_0x81527c(0x142))/0x9)+-parseInt(_0x81527c(0x164))/0xa*(-parseInt(_0x81527c(0x170))/0xb)+parseInt(_0x81527c(0x144))/0xc*(-parseInt(_0x81527c(0x136))/0xd);if(_0x5dbff6===_0x572e8a)break;else _0x4505b5['push'](_0x4505b5['shift']());}catch(_0x264982){_0x4505b5['push'](_0x4505b5['shift']());}}}(_0x4104,0xd3842));import{CKEditorError as _0x252a34,EmitterMixin as _0x15519f,logWarning as _0x6acb}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x13ace8}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x4a912c,AI_CONTEXT_MODEL_EVENT_NAMES as _0x2af3da}from'./aichatcontext.js';import{AICapabilities as _0x3b6257,CAPABILITIES_MODEL_EVENT_NAMES as _0x272746}from'../../aicore/model/aicapabilities.js';function _0x1fb5(_0x436924,_0x50806f){const _0x4104d1=_0x4104();return _0x1fb5=function(_0x1fb5b5,_0x393841){_0x1fb5b5=_0x1fb5b5-0x10c;let _0x3fbe1d=_0x4104d1[_0x1fb5b5];return _0x3fbe1d;},_0x1fb5(_0x436924,_0x50806f);}import{AIChatInteraction as _0x11a905}from'./aichatinteraction.js';import{errorsMap as _0x2d0718}from'../../errorsmap.js';export class AIChatConversation extends _0x15519f(){['id'];[_0x2918e4(0x14b)]=!0x1;[_0x2918e4(0x10f)]=[];[_0x2918e4(0x119)];[_0x2918e4(0x156)];[_0x2918e4(0x11d)];[_0x2918e4(0x125)];constructor(_0x25a574){const _0x545f5f=_0x2918e4;super(),this[_0x545f5f(0x125)]=_0x25a574,this[_0x545f5f(0x11d)]=_0x25a574[_0x545f5f(0x11d)],this[_0x545f5f(0x13d)]=_0x25a574[_0x545f5f(0x13d)],this['id']=_0x25a574[_0x545f5f(0x130)];}async[_0x2918e4(0x179)](_0x5d7c3d){const _0x11d1fe=_0x2918e4;try{this[_0x11d1fe(0x14e)]=new _0x4a912c({'connector':this[_0x11d1fe(0x11d)],'config':_0x5d7c3d,'ownerId':this['id']}),this[_0x11d1fe(0x14e)][_0x11d1fe(0x13e)](..._0x2af3da)['to'](this),this[_0x11d1fe(0x14e)][_0x11d1fe(0x179)](),this[_0x11d1fe(0x14c)]=new _0x3b6257(),this[_0x11d1fe(0x14c)][_0x11d1fe(0x13e)](..._0x272746)['to'](this),this[_0x11d1fe(0x14c)][_0x11d1fe(0x179)]();const _0x1868c8=await this[_0x11d1fe(0x13d)][_0x11d1fe(0x157)]();this[_0x11d1fe(0x114)](_0x11d1fe(0x153),{'availableModels':_0x1868c8});const _0x309348=await this[_0x11d1fe(0x13d)][_0x11d1fe(0x12c)](this[_0x11d1fe(0x125)][_0x11d1fe(0x14d)]);_0x309348&&await this[_0x11d1fe(0x16f)](_0x309348);}catch(_0x6e673e){const _0x52f86d=new _0x252a34(_0x11d1fe(0x173),null,{'message':_0x6e673e[_0x11d1fe(0x14a)]||_0x6e673e});_0x52f86d[_0x11d1fe(0x181)]=_0x6e673e[_0x11d1fe(0x181)],this[_0x11d1fe(0x114)](_0x11d1fe(0x112),{'error':_0x52f86d});}}async[_0x2918e4(0x15a)](){const _0xff85=_0x2918e4;if(this[_0xff85(0x14b)])throw new _0x252a34(_0xff85(0x163),null,{'conversation':this});if(!this[_0xff85(0x156)])throw new _0x252a34(_0xff85(0x16d),null,{'conversation':this});try{const {id:_0x3eee04}=await this[_0xff85(0x11d)][_0xff85(0x147)](this['id'],this[_0xff85(0x125)][_0xff85(0x13a)])[_0xff85(0x11f)]();this['id']=_0x3eee04,this[_0xff85(0x14b)]=!0x0,this[_0xff85(0x114)](_0xff85(0x160),{'conversationId':this['id'],'selectedModel':this[_0xff85(0x156)]});}catch(_0xbc480){const _0x19cc18=new _0x252a34(_0xff85(0x11b),null,{'message':_0xbc480[_0xff85(0x14a)],'conversationId':this['id']});throw _0x19cc18[_0xff85(0x181)]=_0xbc480[_0xff85(0x181)],this[_0xff85(0x114)](_0xff85(0x112),{'error':_0x19cc18}),_0x19cc18;}}async[_0x2918e4(0x17b)](_0x84635e,_0x2f5678){const _0x5dd5c1=_0x2918e4;try{const _0x24ec61=await this[_0x5dd5c1(0x11d)][_0x5dd5c1(0x171)](_0x84635e)[_0x5dd5c1(0x11f)](),_0x2cec1b=await this[_0x5dd5c1(0x11d)][_0x5dd5c1(0x155)](_0x84635e)[_0x5dd5c1(0x124)](),_0x27531b=_0x2cec1b[0x0][_0x5dd5c1(0x127)];this[_0x5dd5c1(0x14b)]=!0x0,this['id']=_0x24ec61['id'],_0x5dd5c1(0x117)in _0x24ec61?this[_0x5dd5c1(0x114)](_0x5dd5c1(0x135),_0x24ec61[_0x5dd5c1(0x117)],!0x0):this[_0x5dd5c1(0x114)](_0x5dd5c1(0x135),'',!0x0);const _0xeddf9b=(await this[_0x5dd5c1(0x13d)][_0x5dd5c1(0x149)]())[_0x5dd5c1(0x169)](_0x24ee58=>_0x24ee58['id'][_0x5dd5c1(0x172)]()===_0x27531b[_0x5dd5c1(0x172)]());return this[_0x5dd5c1(0x156)]=_0xeddf9b,this[_0x5dd5c1(0x114)](_0x5dd5c1(0x17f),{'selectedModel':_0xeddf9b,'isDisabled':!0x0}),await this[_0x5dd5c1(0x12e)](_0x2cec1b,_0x2f5678,_0x27531b),this[_0x5dd5c1(0x119)]=void 0x0,this;}catch(_0x4c8050){const _0x101985=new _0x252a34(_0x5dd5c1(0x16e),null,{'message':_0x4c8050[_0x5dd5c1(0x14a)],'conversationId':_0x84635e});throw _0x101985[_0x5dd5c1(0x181)]=_0x4c8050[_0x5dd5c1(0x181)],this[_0x5dd5c1(0x114)](_0x5dd5c1(0x112),{'error':_0x101985}),_0x101985;}}async[_0x2918e4(0x12e)](_0x376e15,_0xb33f85,_0x255820){const _0x16bf6b=_0x2918e4;let _0x3a068e;for(const _0x28cff7 of _0x376e15)if(_0x16bf6b(0x161)===_0x28cff7[_0x16bf6b(0x12d)]){const _0x4ab91d=await this[_0x16bf6b(0x165)](_0x28cff7),_0x7ee4f7={'isReasoningEnabled':Object[_0x16bf6b(0x16b)](_0x28cff7[_0x16bf6b(0x178)],_0x16bf6b(0x118)),'isWebSearchEnabled':Object[_0x16bf6b(0x16b)](_0x28cff7[_0x16bf6b(0x178)],_0x16bf6b(0x122))};_0x3a068e=this[_0x16bf6b(0x111)]({'userMessage':_0x28cff7[_0x16bf6b(0x162)],'contextItems':_0x4ab91d,'capabilities':_0x7ee4f7,'modelId':_0x255820,'quickActionData':_0x28cff7[_0x16bf6b(0x123)]?.[_0x16bf6b(0x150)]}),this[_0x16bf6b(0x119)]=_0x3a068e,this[_0x16bf6b(0x14e)][_0x16bf6b(0x129)](this[_0x16bf6b(0x119)][_0x16bf6b(0x133)]);}else{if(_0x16bf6b(0x131)===_0x28cff7[_0x16bf6b(0x12d)]&&_0x3a068e)for(const _0xd82aee of _0x28cff7[_0x16bf6b(0x132)]){const _0x1d4b91=_0x16bf6b(0x137)===_0xd82aee[_0x16bf6b(0x11a)]?_0x16bf6b(0x17e):_0x16bf6b(0x134),_0x1b0c1c=_0x3a068e[_0x16bf6b(0x10d)]()?.[_0x16bf6b(0x15b)]!==_0xb33f85;_0x3a068e[_0x16bf6b(0x10e)]=_0x3a068e[_0x16bf6b(0x143)]({'type':_0x1d4b91,'isDone':!0x0,'interactionId':_0x3a068e['id'],'areActionsDisabled':_0x1b0c1c}),_0x3a068e[_0x16bf6b(0x10e)][_0x16bf6b(0x175)](_0xd82aee[_0x16bf6b(0x132)]);}}}async[_0x2918e4(0x165)](_0x3a561e){const _0x632ec9=_0x2918e4,_0x40b6ee=new Map();if(!_0x3a561e[_0x632ec9(0x132)])return _0x40b6ee;for(const _0x5cdf1b of _0x3a561e[_0x632ec9(0x132)]){const _0x5df87f=await this[_0x632ec9(0x14e)][_0x632ec9(0x184)](_0x5cdf1b);_0x5df87f&&_0x40b6ee[_0x632ec9(0x158)](_0x5df87f['id'],_0x5df87f);}return _0x40b6ee;}async[_0x2918e4(0x138)]({userMessage:_0x21f69a,quickActionData:_0x134939}){const _0x584238=_0x2918e4;if(!this[_0x584238(0x14b)])throw new _0x252a34(_0x584238(0x168),null,{'conversation':this});if(this[_0x584238(0x119)])throw new _0x252a34(_0x584238(0x183),null,{'conversation':this});try{const _0x48e59b=this[_0x584238(0x14e)][_0x584238(0x174)](),_0x300c01=this[_0x584238(0x14c)][_0x584238(0x14f)](),_0xf68374=this[_0x584238(0x156)]['id'];this[_0x584238(0x119)]=this[_0x584238(0x111)]({'userMessage':_0x21f69a,'contextItems':_0x48e59b,'capabilities':_0x300c01,'modelId':_0xf68374,'quickActionData':_0x134939}),await this[_0x584238(0x119)][_0x584238(0x15a)](),this[_0x584238(0x14e)][_0x584238(0x129)](this[_0x584238(0x119)][_0x584238(0x133)]);}catch(_0x1ad73e){if(_0x1ad73e instanceof _0x252a34)this[_0x584238(0x114)](_0x584238(0x112),{'interactionId':this[_0x584238(0x119)]?this[_0x584238(0x119)]['id']:void 0x0,'error':_0x1ad73e});else{const _0x73f883=_0x2d0718[_0x584238(0x139)](_0x1ad73e[_0x584238(0x116)])||_0x584238(0x154);this[_0x584238(0x114)](_0x584238(0x112),{'interactionId':this[_0x584238(0x119)]?this[_0x584238(0x119)]['id']:void 0x0,'error':new _0x252a34(_0x73f883,null,{'error':_0x1ad73e})});}}finally{this[_0x584238(0x119)]?.[_0x584238(0x152)](),this[_0x584238(0x119)]=void 0x0;}}[_0x2918e4(0x111)]({userMessage:_0x3805ca,contextItems:_0x57bbf0,capabilities:_0x2f4a28,modelId:_0x218459,quickActionData:_0x1e91c6}){const _0x255876=_0x2918e4,_0x5ab138=new _0x11a905({'userMessage':_0x3805ca,'contextItems':_0x57bbf0,'capabilities':_0x2f4a28,'conversationId':this['id'],'connector':this[_0x255876(0x11d)],'editor':this[_0x255876(0x125)][_0x255876(0x13c)]&&this[_0x255876(0x125)][_0x255876(0x13c)](),'model':_0x218459,'quickActionData':_0x1e91c6});return _0x5ab138[_0x255876(0x13e)](..._0x13ace8)['to'](this),this[_0x255876(0x10f)][_0x255876(0x121)](_0x5ab138),this[_0x255876(0x114)](_0x255876(0x140),_0x5ab138),_0x5ab138;}[_0x2918e4(0x15f)](_0x1046b0){const _0x5aca5c=_0x2918e4;return this[_0x5aca5c(0x10f)][_0x5aca5c(0x169)](_0x298693=>_0x298693['id']===_0x1046b0);}[_0x2918e4(0x180)](_0x535d50){const _0x482345=_0x2918e4,_0x244630=this[_0x482345(0x15f)](_0x535d50);_0x244630&&(_0x244630[_0x482345(0x126)](),this[_0x482345(0x10f)][_0x482345(0x110)](this[_0x482345(0x10f)][_0x482345(0x141)](_0x244630),0x1));}get[_0x2918e4(0x115)](){const _0x2ad3ad=_0x2918e4;return this[_0x2ad3ad(0x10f)][this[_0x2ad3ad(0x10f)][_0x2ad3ad(0x15c)]-0x1];}[_0x2918e4(0x120)](_0x2ad8fa){const _0x5cb8bf=_0x2918e4;this[_0x5cb8bf(0x14e)][_0x5cb8bf(0x120)](_0x2ad8fa);}async[_0x2918e4(0x145)]({content:_0x16fc31,version:_0x16a91a,sessionId:_0x1c8515,selections:_0x52d347}){const _0xc3988=_0x2918e4;await this[_0xc3988(0x14e)][_0xc3988(0x166)](_0x16fc31,_0x16a91a,_0x1c8515,_0x52d347);}[_0x2918e4(0x128)](){const _0x273a86=_0x2918e4;return this[_0x273a86(0x119)]?.[_0x273a86(0x10d)]()?.[_0x273a86(0x132)]||'';}[_0x2918e4(0x12f)](_0x1c39b8){const _0x1d9eac=_0x2918e4;this[_0x1d9eac(0x14e)][_0x1d9eac(0x12f)](_0x1c39b8);}[_0x2918e4(0x159)](){const _0x18130d=_0x2918e4;this[_0x18130d(0x14e)][_0x18130d(0x159)]();}[_0x2918e4(0x12a)](_0x7e563){const _0x19c2d9=_0x2918e4;this[_0x19c2d9(0x14e)][_0x19c2d9(0x12a)](_0x7e563);}[_0x2918e4(0x13b)](_0x2abd1d){const _0xd89449=_0x2918e4;this[_0xd89449(0x14e)][_0xd89449(0x13b)](_0x2abd1d);}[_0x2918e4(0x167)](_0x17968f,_0x3c6973){const _0x4c66b9=_0x2918e4;this[_0x4c66b9(0x14e)][_0x4c66b9(0x167)](_0x17968f,_0x3c6973);}[_0x2918e4(0x151)](_0x5a92fd,_0x55f181,_0x145e7d){const _0x4dbe07=_0x2918e4;return this[_0x4dbe07(0x14e)][_0x4dbe07(0x151)](_0x5a92fd,_0x55f181,_0x145e7d);}[_0x2918e4(0x176)](_0x3d3d31){const _0x3addb8=_0x2918e4;this[_0x3addb8(0x14e)][_0x3addb8(0x176)](_0x3d3d31);}[_0x2918e4(0x113)](){const _0x9e3997=_0x2918e4;this[_0x9e3997(0x14c)][_0x9e3997(0x113)]();}[_0x2918e4(0x17a)](){const _0x36e64d=_0x2918e4;this[_0x36e64d(0x14c)][_0x36e64d(0x17a)]();}[_0x2918e4(0x177)](){const _0xa639e7=_0x2918e4;return this[_0xa639e7(0x14e)][_0xa639e7(0x177)]();}[_0x2918e4(0x15d)](){const _0x46fef2=_0x2918e4;return this[_0x46fef2(0x14e)][_0x46fef2(0x15d)]();}[_0x2918e4(0x11c)](){const _0x303138=_0x2918e4;return this[_0x303138(0x14e)][_0x303138(0x11c)]();}async[_0x2918e4(0x16f)](_0x14f78a){const _0x1f3738=_0x2918e4;_0x14f78a?!0x1===await this[_0x1f3738(0x13d)][_0x1f3738(0x16a)](_0x14f78a)&&(_0x6acb(_0x1f3738(0x182),{'conversation':this,'model':_0x14f78a}),_0x14f78a=(await this[_0x1f3738(0x13d)][_0x1f3738(0x157)]())[0x0]):(_0x6acb(_0x1f3738(0x10c),{'conversation':this}),_0x14f78a=(await this[_0x1f3738(0x13d)][_0x1f3738(0x157)]())[0x0]),_0x14f78a['id']!==this[_0x1f3738(0x156)]?.['id']&&(this[_0x1f3738(0x156)]=_0x14f78a,this[_0x1f3738(0x14c)][_0x1f3738(0x17c)](),this[_0x1f3738(0x114)](_0x1f3738(0x17f),{'selectedModel':_0x14f78a}));}}function _0x4104(){const _0x3bd68d=['interactions','splice','createInteraction','error','toggleWebSearch','fire','lastInteraction','code','title','reasoning','currentInteraction','type','ai-chat-conversation-start-failed','isSelectionInContext','connector','24884QomPAZ','getConversation','addCurrentDocumentToContext','push','webSearch','attributes','getMessages','options','destroy','model','getCurrentDocumentContext','addToConversationContext','addFilesToContext','19340PJetIj','getModel','role','_processMessagesToInteractions','addSelectionToContext','conversationId','assistant','content','contextItems','modification-delta','setConversationTitle','923XLLPgW','text','handleUserInteraction','get','group','addUrlToContext','getEditor','chatModels','delegate','821388jtXIhF','interactionCreated','indexOf','3951NXWlra','createReply','341148BmXcXV','updateCurrentDocumentInContext','147ONWOoq','startConversation','1326262BmipOf','getAll','message','isStarted','chatCapabilities','selectedModelId','chatContext','getCapabilitiesConfig','quickActionData','loadSourceResources','stop','conversationInitialized','ai-chat-handle-user-interaction-start-failed','fetchConversationMessages','selectedModel','getAvailableModels','set','removeSelectionFromContext','start','sessionId','length','isCurrentDocumentInConversation','14008TareRi','getInteraction','conversationStarted','user','prompt','ai-chat-conversation-already-started','11147600XzdbjA','_extractContextItems','updateCurrentDocument','addResourceToContext','ai-chat-handle-user-conversation-not-initialized','find','isAvailable','hasOwn','45YYARJd','ai-chat-conversation-start-no-model-selected','ai-chat-conversation-init-from-id-failed','setModel','11OCqInR','fetchConversation','toLowerCase','ai-chat-conversation-init-failed','getPendingContextItems','appendContent','removeFromContext','isCurrentDocumentInContext','capabilities','init','toggleReasoning','load','reset','36LQnwyP','text-delta','modelSelected','removeInteraction','stack','ai-chat-conversation-set-model-not-available','ai-chat-handle-user-interaction-already-in-progress','populateFromMessage','ai-chat-conversation-set-model-null','getDocumentContext','currentReply'];_0x4104=function(){return _0x3bd68d;};return _0x4104();}
|
|
23
|
+
const _0x2306c6=_0x5755;(function(_0x3f7c55,_0x1e334c){const _0xdcc68d=_0x5755,_0x53a3ca=_0x3f7c55();while(!![]){try{const _0x52ca9a=-parseInt(_0xdcc68d(0xec))/0x1*(parseInt(_0xdcc68d(0xd9))/0x2)+-parseInt(_0xdcc68d(0xfd))/0x3*(-parseInt(_0xdcc68d(0xdd))/0x4)+parseInt(_0xdcc68d(0xd7))/0x5+parseInt(_0xdcc68d(0xaa))/0x6*(-parseInt(_0xdcc68d(0xc1))/0x7)+-parseInt(_0xdcc68d(0xb6))/0x8*(-parseInt(_0xdcc68d(0xa6))/0x9)+parseInt(_0xdcc68d(0xb7))/0xa*(parseInt(_0xdcc68d(0xf0))/0xb)+parseInt(_0xdcc68d(0xbd))/0xc;if(_0x52ca9a===_0x1e334c)break;else _0x53a3ca['push'](_0x53a3ca['shift']());}catch(_0x112c23){_0x53a3ca['push'](_0x53a3ca['shift']());}}}(_0x1fa4,0xa8d38));import{CKEditorError as _0x340a07,EmitterMixin as _0x5885af,logWarning as _0x57c52a}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x1704ab}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1faa1e,AI_CONTEXT_MODEL_EVENT_NAMES as _0x35a2e1}from'./aichatcontext.js';import{AICapabilities as _0x26d618,CAPABILITIES_MODEL_EVENT_NAMES as _0x31c8e2}from'../../aicore/model/aicapabilities.js';function _0x5755(_0x4a0d27,_0x2f7737){const _0x1fa4b0=_0x1fa4();return _0x5755=function(_0x57552f,_0x37cb8b){_0x57552f=_0x57552f-0xa3;let _0x11e0f8=_0x1fa4b0[_0x57552f];return _0x11e0f8;},_0x5755(_0x4a0d27,_0x2f7737);}import{AIChatInteraction as _0x610ae6}from'./aichatinteraction.js';function _0x1fa4(){const _0x49f24b=['getAll','toLowerCase','ai-chat-conversation-start-no-model-selected','ai-chat-handle-user-interaction-already-in-progress','336459WtUzFk','find','set','message','interactions','delegate','title','handleUserInteraction','loadSourceResources','capabilities','destroy','getCurrentDocumentContext','getDocumentContext','group','toggleReasoning','addToConversationContext','user','init','modelSelected','prompt','updateCurrentDocument','type','stop','getCapabilitiesConfig','updateCurrentDocumentInContext','ai-chat-conversation-init-failed','sessionId','connector','addFilesToContext','text','_extractContextItems','getAvailableModels','toggleWebSearch','27DHiaFw','interactionCreated','webSearch','get','98466zmKrjl','splice','stack','fetchConversation','currentInteraction','lastInteraction','start','attributes','code','ai-chat-handle-user-conversation-not-initialized','isCurrentDocumentInConversation','addSelectionToContext','169104BxveGh','5175470ZWkyMT','addCurrentDocumentToContext','currentReply','addResourceToContext','conversationId','ai-chat-handle-user-interaction-start-failed','2811756gSOvXK','ai-chat-conversation-init-from-id-failed','isCurrentDocumentInContext','chatContext','560okclkD','addUrlToContext','populateFromMessage','chatCapabilities','setModel','chatModels','createReply','isStarted','push','assistant','appendContent','indexOf','isSelectionInContext','ai-chat-conversation-set-model-not-available','selectedModelId','quickActionData','getConversation','contextItems','setConversationTitle','getEditor','ai-chat-conversation-set-model-null','load','4908965boNhwj','getInteraction','258268BcoEPM','conversationInitialized','error','length','12iIlsjn','conversationStarted','options','reasoning','createInteraction','removeSelectionFromContext','removeInteraction','role','text-delta','removeFromContext','ai-chat-conversation-already-started','_processMessagesToInteractions','startConversation','selectedModel','ai-chat-conversation-start-failed','1tjxIal','fire','fetchConversationMessages','getMessages','11obPyzK','getModel','reset','content','hasOwn','getPendingContextItems','modification-delta','isAvailable','model'];_0x1fa4=function(){return _0x49f24b;};return _0x1fa4();}import{errorsMap as _0x346be0}from'../../errorsmap.js';export class AIChatConversation extends _0x5885af(){['id'];[_0x2306c6(0xc8)]=!0x1;[_0x2306c6(0x101)]=[];[_0x2306c6(0xae)];[_0x2306c6(0xea)];[_0x2306c6(0x118)];[_0x2306c6(0xdf)];constructor(_0x5233df){const _0x214de3=_0x2306c6;super(),this[_0x214de3(0xdf)]=_0x5233df,this[_0x214de3(0x118)]=_0x5233df[_0x214de3(0x118)],this[_0x214de3(0xc6)]=_0x5233df[_0x214de3(0xc6)],this['id']=_0x5233df[_0x214de3(0xbb)];}async[_0x2306c6(0x10e)](_0x36daef){const _0x5141e8=_0x2306c6;try{this[_0x5141e8(0xc0)]=new _0x1faa1e({'connector':this[_0x5141e8(0x118)],'config':_0x36daef,'ownerId':this['id']}),this[_0x5141e8(0xc0)][_0x5141e8(0x102)](..._0x35a2e1)['to'](this),this[_0x5141e8(0xc0)][_0x5141e8(0x10e)](),this[_0x5141e8(0xc4)]=new _0x26d618(),this[_0x5141e8(0xc4)][_0x5141e8(0x102)](..._0x31c8e2)['to'](this),this[_0x5141e8(0xc4)][_0x5141e8(0x10e)]();const _0x57c15e=await this[_0x5141e8(0xc6)][_0x5141e8(0xa4)]();this[_0x5141e8(0xed)](_0x5141e8(0xda),{'availableModels':_0x57c15e});const _0x492953=await this[_0x5141e8(0xc6)][_0x5141e8(0xf1)](this[_0x5141e8(0xdf)][_0x5141e8(0xcf)]);_0x492953&&await this[_0x5141e8(0xc5)](_0x492953);}catch(_0x224446){const _0x1c34cb=new _0x340a07(_0x5141e8(0x116),null,{'message':_0x224446[_0x5141e8(0x100)]||_0x224446});_0x1c34cb[_0x5141e8(0xac)]=_0x224446[_0x5141e8(0xac)],this[_0x5141e8(0xed)](_0x5141e8(0xdb),{'error':_0x1c34cb});}}async[_0x2306c6(0xb0)](){const _0x232a30=_0x2306c6;if(this[_0x232a30(0xc8)])throw new _0x340a07(_0x232a30(0xe7),null,{'conversation':this});if(!this[_0x232a30(0xea)])throw new _0x340a07(_0x232a30(0xfb),null,{'conversation':this});try{const {id:_0x1b9dd8}=await this[_0x232a30(0x118)][_0x232a30(0xe9)](this['id'],this[_0x232a30(0xdf)][_0x232a30(0x10a)])[_0x232a30(0xd1)]();this['id']=_0x1b9dd8,this[_0x232a30(0xc8)]=!0x0,this[_0x232a30(0xed)](_0x232a30(0xde),{'conversationId':this['id'],'selectedModel':this[_0x232a30(0xea)]});}catch(_0x5a4411){const _0xf4f21=new _0x340a07(_0x232a30(0xeb),null,{'message':_0x5a4411[_0x232a30(0x100)],'conversationId':this['id']});throw _0xf4f21[_0x232a30(0xac)]=_0x5a4411[_0x232a30(0xac)],this[_0x232a30(0xed)](_0x232a30(0xdb),{'error':_0xf4f21}),_0xf4f21;}}async[_0x2306c6(0xd6)](_0x2dc415,_0x56ecfa){const _0x42732a=_0x2306c6;try{const _0x1692b9=await this[_0x42732a(0x118)][_0x42732a(0xad)](_0x2dc415)[_0x42732a(0xd1)](),_0x33776b=await this[_0x42732a(0x118)][_0x42732a(0xee)](_0x2dc415)[_0x42732a(0xef)](),_0x2fed9c=_0x33776b[0x0][_0x42732a(0xf8)];this[_0x42732a(0xc8)]=!0x0,this['id']=_0x1692b9['id'],_0x42732a(0x103)in _0x1692b9?this[_0x42732a(0xed)](_0x42732a(0xd3),_0x1692b9[_0x42732a(0x103)],!0x0):this[_0x42732a(0xed)](_0x42732a(0xd3),'',!0x0);const _0x24c0f4=(await this[_0x42732a(0xc6)][_0x42732a(0xf9)]())[_0x42732a(0xfe)](_0x22fbae=>_0x22fbae['id'][_0x42732a(0xfa)]()===_0x2fed9c[_0x42732a(0xfa)]());return this[_0x42732a(0xea)]=_0x24c0f4,this[_0x42732a(0xed)](_0x42732a(0x10f),{'selectedModel':_0x24c0f4,'isDisabled':!0x0}),await this[_0x42732a(0xe8)](_0x33776b,_0x56ecfa,_0x2fed9c),this[_0x42732a(0xae)]=void 0x0,this;}catch(_0xbd27f){const _0x2f56fd=new _0x340a07(_0x42732a(0xbe),null,{'message':_0xbd27f[_0x42732a(0x100)],'conversationId':_0x2dc415});throw _0x2f56fd[_0x42732a(0xac)]=_0xbd27f[_0x42732a(0xac)],this[_0x42732a(0xed)](_0x42732a(0xdb),{'error':_0x2f56fd}),_0x2f56fd;}}async[_0x2306c6(0xe8)](_0x10a159,_0x29b326,_0x5a6e51){const _0x7fd3ae=_0x2306c6;let _0x3e2163;for(const _0x2260ad of _0x10a159)if(_0x7fd3ae(0x10d)===_0x2260ad[_0x7fd3ae(0xe4)]){const _0x425a79=await this[_0x7fd3ae(0xa3)](_0x2260ad),_0x9f5a4b={'isReasoningEnabled':Object[_0x7fd3ae(0xf4)](_0x2260ad[_0x7fd3ae(0x106)],_0x7fd3ae(0xe0)),'isWebSearchEnabled':Object[_0x7fd3ae(0xf4)](_0x2260ad[_0x7fd3ae(0x106)],_0x7fd3ae(0xa8))};_0x3e2163=this[_0x7fd3ae(0xe1)]({'userMessage':_0x2260ad[_0x7fd3ae(0x110)],'contextItems':_0x425a79,'capabilities':_0x9f5a4b,'modelId':_0x5a6e51,'quickActionData':_0x2260ad[_0x7fd3ae(0xb1)]?.[_0x7fd3ae(0xd0)]}),this[_0x7fd3ae(0xae)]=_0x3e2163,this[_0x7fd3ae(0xc0)][_0x7fd3ae(0x10c)](this[_0x7fd3ae(0xae)][_0x7fd3ae(0xd2)]);}else{if(_0x7fd3ae(0xca)===_0x2260ad[_0x7fd3ae(0xe4)]&&_0x3e2163)for(const _0x5662c6 of _0x2260ad[_0x7fd3ae(0xf3)]){const _0x45cf89=_0x7fd3ae(0x11a)===_0x5662c6[_0x7fd3ae(0x112)]?_0x7fd3ae(0xe5):_0x7fd3ae(0xf6),_0x1a6e55=_0x3e2163[_0x7fd3ae(0x109)]()?.[_0x7fd3ae(0x117)]!==_0x29b326;_0x3e2163[_0x7fd3ae(0xb9)]=_0x3e2163[_0x7fd3ae(0xc7)]({'type':_0x45cf89,'isDone':!0x0,'interactionId':_0x3e2163['id'],'areActionsDisabled':_0x1a6e55}),_0x3e2163[_0x7fd3ae(0xb9)][_0x7fd3ae(0xcb)](_0x5662c6[_0x7fd3ae(0xf3)]);}}}async[_0x2306c6(0xa3)](_0x4817b4){const _0x2777f9=_0x2306c6,_0x38d9dd=new Map();if(!_0x4817b4[_0x2777f9(0xf3)])return _0x38d9dd;for(const _0x243534 of _0x4817b4[_0x2777f9(0xf3)]){const _0x177e61=await this[_0x2777f9(0xc0)][_0x2777f9(0xc3)](_0x243534);_0x177e61&&_0x38d9dd[_0x2777f9(0xff)](_0x177e61['id'],_0x177e61);}return _0x38d9dd;}async[_0x2306c6(0x104)]({userMessage:_0xa45f5e,quickActionData:_0x553a6d}){const _0x420b5a=_0x2306c6;if(!this[_0x420b5a(0xc8)])throw new _0x340a07(_0x420b5a(0xb3),null,{'conversation':this});if(this[_0x420b5a(0xae)])throw new _0x340a07(_0x420b5a(0xfc),null,{'conversation':this});try{const _0x1568f0=this[_0x420b5a(0xc0)][_0x420b5a(0xf5)](),_0x4d7442=this[_0x420b5a(0xc4)][_0x420b5a(0x114)](),_0x4a5025=this[_0x420b5a(0xea)]['id'];this[_0x420b5a(0xae)]=this[_0x420b5a(0xe1)]({'userMessage':_0xa45f5e,'contextItems':_0x1568f0,'capabilities':_0x4d7442,'modelId':_0x4a5025,'quickActionData':_0x553a6d}),await this[_0x420b5a(0xae)][_0x420b5a(0xb0)](),this[_0x420b5a(0xc0)][_0x420b5a(0x10c)](this[_0x420b5a(0xae)][_0x420b5a(0xd2)]);}catch(_0x2a7d7d){if(_0x2a7d7d instanceof _0x340a07)this[_0x420b5a(0xed)](_0x420b5a(0xdb),{'interactionId':this[_0x420b5a(0xae)]?this[_0x420b5a(0xae)]['id']:void 0x0,'error':_0x2a7d7d});else{const _0x4bca79=_0x346be0[_0x420b5a(0xa9)](_0x2a7d7d[_0x420b5a(0xb2)])||_0x420b5a(0xbc);this[_0x420b5a(0xed)](_0x420b5a(0xdb),{'interactionId':this[_0x420b5a(0xae)]?this[_0x420b5a(0xae)]['id']:void 0x0,'error':new _0x340a07(_0x4bca79,null,{'error':_0x2a7d7d})});}}finally{this[_0x420b5a(0xae)]?.[_0x420b5a(0x113)](),this[_0x420b5a(0xae)]=void 0x0;}}[_0x2306c6(0xe1)]({userMessage:_0x17d0e3,contextItems:_0x12124e,capabilities:_0x554577,modelId:_0x2e0514,quickActionData:_0x546326}){const _0x215287=_0x2306c6,_0x400eea=new _0x610ae6({'userMessage':_0x17d0e3,'contextItems':_0x12124e,'capabilities':_0x554577,'conversationId':this['id'],'connector':this[_0x215287(0x118)],'editor':this[_0x215287(0xdf)][_0x215287(0xd4)]&&this[_0x215287(0xdf)][_0x215287(0xd4)](),'model':_0x2e0514,'quickActionData':_0x546326});return _0x400eea[_0x215287(0x102)](..._0x1704ab)['to'](this),this[_0x215287(0x101)][_0x215287(0xc9)](_0x400eea),this[_0x215287(0xed)](_0x215287(0xa7),_0x400eea),_0x400eea;}[_0x2306c6(0xd8)](_0x468198){const _0x44b656=_0x2306c6;return this[_0x44b656(0x101)][_0x44b656(0xfe)](_0x400c00=>_0x400c00['id']===_0x468198);}[_0x2306c6(0xe3)](_0x55d31c){const _0x46cf83=_0x2306c6,_0x127a4c=this[_0x46cf83(0xd8)](_0x55d31c);_0x127a4c&&(_0x127a4c[_0x46cf83(0x107)](),this[_0x46cf83(0x101)][_0x46cf83(0xab)](this[_0x46cf83(0x101)][_0x46cf83(0xcc)](_0x127a4c),0x1));}get[_0x2306c6(0xaf)](){const _0x1f9241=_0x2306c6;return this[_0x1f9241(0x101)][this[_0x1f9241(0x101)][_0x1f9241(0xdc)]-0x1];}[_0x2306c6(0xb8)](_0x43fa3c){const _0xa9b8bf=_0x2306c6;this[_0xa9b8bf(0xc0)][_0xa9b8bf(0xb8)](_0x43fa3c);}async[_0x2306c6(0x115)]({content:_0xb1e644,version:_0x473d71,sessionId:_0x93aaf7,selections:_0x5e4190}){const _0x15930e=_0x2306c6;await this[_0x15930e(0xc0)][_0x15930e(0x111)](_0xb1e644,_0x473d71,_0x93aaf7,_0x5e4190);}[_0x2306c6(0x108)](){const _0x21b8b1=_0x2306c6;return this[_0x21b8b1(0xae)]?.[_0x21b8b1(0x109)]()?.[_0x21b8b1(0xf3)]||'';}[_0x2306c6(0xb5)](_0x120e9a){const _0xf54211=_0x2306c6;this[_0xf54211(0xc0)][_0xf54211(0xb5)](_0x120e9a);}[_0x2306c6(0xe2)](){const _0xf1c6c0=_0x2306c6;this[_0xf1c6c0(0xc0)][_0xf1c6c0(0xe2)]();}[_0x2306c6(0x119)](_0x4f8525){const _0x57f106=_0x2306c6;this[_0x57f106(0xc0)][_0x57f106(0x119)](_0x4f8525);}[_0x2306c6(0xc2)](_0x503fa0){const _0x4cebe1=_0x2306c6;this[_0x4cebe1(0xc0)][_0x4cebe1(0xc2)](_0x503fa0);}[_0x2306c6(0xba)](_0x4925f0,_0x18cfd4){const _0x37f9ac=_0x2306c6;this[_0x37f9ac(0xc0)][_0x37f9ac(0xba)](_0x4925f0,_0x18cfd4);}[_0x2306c6(0x105)](_0x346abc,_0x27e174,_0x396fd0){const _0x54089a=_0x2306c6;return this[_0x54089a(0xc0)][_0x54089a(0x105)](_0x346abc,_0x27e174,_0x396fd0);}[_0x2306c6(0xe6)](_0xa969a1){const _0x56cf38=_0x2306c6;this[_0x56cf38(0xc0)][_0x56cf38(0xe6)](_0xa969a1);}[_0x2306c6(0xa5)](){const _0x369ded=_0x2306c6;this[_0x369ded(0xc4)][_0x369ded(0xa5)]();}[_0x2306c6(0x10b)](){const _0x36f1df=_0x2306c6;this[_0x36f1df(0xc4)][_0x36f1df(0x10b)]();}[_0x2306c6(0xbf)](){const _0x53886c=_0x2306c6;return this[_0x53886c(0xc0)][_0x53886c(0xbf)]();}[_0x2306c6(0xb4)](){const _0x48d209=_0x2306c6;return this[_0x48d209(0xc0)][_0x48d209(0xb4)]();}[_0x2306c6(0xcd)](){const _0x2098fe=_0x2306c6;return this[_0x2098fe(0xc0)][_0x2098fe(0xcd)]();}async[_0x2306c6(0xc5)](_0x3d4d97){const _0x3b40cf=_0x2306c6;_0x3d4d97?!0x1===await this[_0x3b40cf(0xc6)][_0x3b40cf(0xf7)](_0x3d4d97)&&(_0x57c52a(_0x3b40cf(0xce),{'conversation':this,'model':_0x3d4d97}),_0x3d4d97=(await this[_0x3b40cf(0xc6)][_0x3b40cf(0xa4)]())[0x0]):(_0x57c52a(_0x3b40cf(0xd5),{'conversation':this}),_0x3d4d97=(await this[_0x3b40cf(0xc6)][_0x3b40cf(0xa4)]())[0x0]),_0x3d4d97['id']!==this[_0x3b40cf(0xea)]?.['id']&&(this[_0x3b40cf(0xea)]=_0x3d4d97,this[_0x3b40cf(0xc4)][_0x3b40cf(0xf2)](),this[_0x3b40cf(0xed)](_0x3b40cf(0x10f),{'selectedModel':_0x3d4d97}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x5377d5=_0x132a;function _0x132a(_0x4455c4,_0x322114){var _0xc1e5f2=_0xc1e5();return _0x132a=function(_0x132a75,_0x2a074d){_0x132a75=_0x132a75-0xb4;var _0x353688=_0xc1e5f2[_0x132a75];return _0x353688;},_0x132a(_0x4455c4,_0x322114);}(function(_0x21d274,_0x508696){var _0x289628=_0x132a,_0x5b6291=_0x21d274();while(!![]){try{var _0x41826b=parseInt(_0x289628(0xc0))/0x1*(parseInt(_0x289628(0xb9))/0x2)+-parseInt(_0x289628(0xb6))/0x3*(parseInt(_0x289628(0xca))/0x4)+-parseInt(_0x289628(0xc4))/0x5*(parseInt(_0x289628(0xc2))/0x6)+-parseInt(_0x289628(0xbb))/0x7+parseInt(_0x289628(0xc1))/0x8*(parseInt(_0x289628(0xc8))/0x9)+parseInt(_0x289628(0xc7))/0xa+parseInt(_0x289628(0xcb))/0xb;if(_0x41826b===_0x508696)break;else _0x5b6291['push'](_0x5b6291['shift']());}catch(_0x5bf710){_0x5b6291['push'](_0x5b6291['shift']());}}}(_0xc1e5,0x3c0f4));import{AICapabilities as _0x3874e3}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x544bdb}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0xc1890f}from'./aichatcontext.js';export class AIChatInteraction extends _0x544bdb{[_0x5377d5(0xc3)];[_0x5377d5(0xc5)];[_0x5377d5(0xbe)]=new Map();[_0x5377d5(0xbc)];[_0x5377d5(0xb5)];constructor(_0x554c3b){var _0x5548ae=_0x5377d5;super(_0x554c3b),this[_0x5548ae(0xc5)]=_0x554c3b[_0x5548ae(0xc5)],this[_0x5548ae(0xbe)]=_0x554c3b[_0x5548ae(0xbe)],this[_0x5548ae(0xcc)]=_0x554c3b[_0x5548ae(0xcc)],this[_0x5548ae(0xc3)]=_0x554c3b[_0x5548ae(0xc3)],this[_0x5548ae(0xbc)]=_0x554c3b[_0x5548ae(0xbc)],this[_0x5548ae(0xb5)]=_0x554c3b[_0x5548ae(0xb5)];}async[_0x5377d5(0xbf)](){var _0x584b24=_0x5377d5;return this[_0x584b24(0xbd)][_0x584b24(0xb7)]({'message':this[_0x584b24(0xc3)],'conversationId':this[_0x584b24(0xc5)],'parts':_0xc1890f[_0x584b24(0xba)](this[_0x584b24(0xbe)]),'capabilities':_0x3874e3[_0x584b24(0xc6)](this[_0x584b24(0xcc)]),'model':this[_0x584b24(0xbc)],'quickActionData':this[_0x584b24(0xb5)]});}[_0x5377d5(0xb4)](){var _0x2da731=_0x5377d5;return this[_0x2da731(0xbe)][_0x2da731(0xb8)](_0x2da731(0xc9));}}function _0xc1e5(){var _0x4196ba=['2202067ybNqgs','model','connector','contextItems','sendRequest','3RJyplZ','96rLDrRN','124692PPnVpC','userMessage','40GXZGSt','conversationId','getCapabilitiesRequestData','1368230LSkOJX','40104sXLDRb','current-document','7604IvULYw','2859516XFeYOZ','capabilities','getDocumentContext','quickActionData','15cdJniZ','queryAssistant','get','190730OuhfNN','mapContextItemsToRequestData'];_0xc1e5=function(){return _0x4196ba;};return _0xc1e5();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x3064(){const _0x165d4d=['4150180OgSFGw','4673050lpzipG','filter','length','6HhlzTy','getAll','capabilities','8852825aHCrjC','values','sort','14dCQWBo','1705983jrzYGq','1600773VYNkdA','enabled','6GoLJpI','6931784omTscW','18XbOACb','30043629Bgeksn'];_0x3064=function(){return _0x165d4d;};return _0x3064();}const _0x3fe011=_0x5ea6;(function(_0x3dec84,_0x24ba14){const _0x2d7a15=_0x5ea6,_0x5dca60=_0x3dec84();while(!![]){try{const _0x18bff6=parseInt(_0x2d7a15(0x85))/0x1+-parseInt(_0x2d7a15(0x88))/0x2*(parseInt(_0x2d7a15(0x86))/0x3)+-parseInt(_0x2d7a15(0x8c))/0x4+parseInt(_0x2d7a15(0x93))/0x5*(parseInt(_0x2d7a15(0x90))/0x6)+-parseInt(_0x2d7a15(0x84))/0x7*(parseInt(_0x2d7a15(0x89))/0x8)+parseInt(_0x2d7a15(0x8a))/0x9*(-parseInt(_0x2d7a15(0x8d))/0xa)+parseInt(_0x2d7a15(0x8b))/0xb;if(_0x18bff6===_0x24ba14)break;else _0x5dca60['push'](_0x5dca60['shift']());}catch(_0x2c2e20){_0x5dca60['push'](_0x5dca60['shift']());}}}(_0x3064,0xdc319));function _0x5ea6(_0x233bb8,_0x29d26e){const _0x3064fd=_0x3064();return _0x5ea6=function(_0x5ea633,_0x3862e5){_0x5ea633=_0x5ea633-0x83;let _0x29500b=_0x3064fd[_0x5ea633];return _0x29500b;},_0x5ea6(_0x233bb8,_0x29d26e);}import{AIModels as _0x53a3d1}from'../../aicore/model/aimodels.js';export class AIChatModels extends _0x53a3d1{async[_0x3fe011(0x91)](){const _0x3797e3=_0x3fe011;return(await super[_0x3797e3(0x91)]())[_0x3797e3(0x83)]((_0x6917f4,_0x26b26f)=>{const _0x3a0de6=_0x3797e3,_0x242e86=Object[_0x3a0de6(0x94)](_0x6917f4[_0x3a0de6(0x92)])[_0x3a0de6(0x8e)](_0x898e46=>_0x898e46[_0x3a0de6(0x87)])[_0x3a0de6(0x8f)];return Object[_0x3a0de6(0x94)](_0x26b26f[_0x3a0de6(0x92)])[_0x3a0de6(0x8e)](_0xd99ef1=>_0xd99ef1[_0x3a0de6(0x87)])[_0x3a0de6(0x8f)]-_0x242e86;});}}
|