@ckeditor/ckeditor5-ai 47.3.0-alpha.2 → 47.3.0-alpha.3
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-editor.css +18 -11
- package/dist/index.css +19 -11
- 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.d.ts +1 -0
- 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
- package/theme/aiballoon/aiballoon.css +2 -1
- package/theme/aiquickactions/aiquickactions.css +17 -10
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2bebe0=_0x134b;(function(_0x1dc91e,_0x4c3355){const _0x2c7892=_0x134b,_0x4ad028=_0x1dc91e();while(!![]){try{const _0x592e18=-parseInt(_0x2c7892(0x223))/0x1*(parseInt(_0x2c7892(0x2ec))/0x2)+-parseInt(_0x2c7892(0x2c2))/0x3*(parseInt(_0x2c7892(0x20f))/0x4)+-parseInt(_0x2c7892(0x2f8))/0x5*(parseInt(_0x2c7892(0x237))/0x6)+-parseInt(_0x2c7892(0x29d))/0x7*(-parseInt(_0x2c7892(0x206))/0x8)+parseInt(_0x2c7892(0x2e3))/0x9*(-parseInt(_0x2c7892(0x2ff))/0xa)+parseInt(_0x2c7892(0x30a))/0xb*(-parseInt(_0x2c7892(0x2b9))/0xc)+parseInt(_0x2c7892(0x20c))/0xd;if(_0x592e18===_0x4c3355)break;else _0x4ad028['push'](_0x4ad028['shift']());}catch(_0x2c2107){_0x4ad028['push'](_0x4ad028['shift']());}}}(_0x2fa2,0xd3998));import{ContextPlugin as _0x145d9a,Editor as _0x5c386c}from'ckeditor5/src/core.js';function _0x2fa2(){const _0xfaaec9=['setSelectedModel','replyChangeGroupStateUpdated','nextSibling','toViewRange','log','AI_CHAT_INVALID_REQUEST','addUrlToContext','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai-chat-context-unsupported-type','addOperation','ai-chat-conversation-init-failed','pluginName','redo','rootName','_updateRatings','activeConversation','addContextItem','isLoading','getChildAtOffset','removeFromContext','getAttribute','length','batch','getChildren','21kTTSGs','webSearchFinished','AIConnector','change','contextItemLoadingEnded','showDiff','node','ai-chat-url-upload-failed','ai-chat-missing-channel-id','addFeedItemStaticMessage','changeGroups','root','createPositionAt','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','ai-conversation-','context','applyOperation','activateTab','like','markers','startConversation','_aiConnector','stopInteraction','selection','interactionDestroyed','isDisabled','addResourceToContext','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','12mJsFAL','_stopLastInteraction','partIndex','removeFeedInteraction','interactionId','addFeedItemAISuggestion','TrackChangesEditing','start','addFileToContext','1431081ASvqja','reasoningStarted','_toggleWebSearch','toggleReasoning','AI_CHAT_UNTITLED_CONVERSATION','rejected','addCurrentDocumentToContext','filter','getChild','setAddContextOptions','uiId','state','documentContextContent','getReply','slice','showFakeVisualSelection','getRoot','addFeedItemError','disableControls','upsertAIChatRating','showNext','_logError','showPrevious','showChangeInText','getTransformedByOperation','mapper','close','type','ai.availableReplyActions','_insertSuggestion','ai-chat-context-file-too-many-pages','getFirstRange','new','1007829KDIqwa','reasoningFinished','setConversationTitle','uploadProgressChanged','contextSent','streaming','options','addFeedItemUserMessage','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','775468peeAhN','sourceResourcesLoaded','handleUserInteraction','createConversation','isDocumentOperation','_startConversationSafely','query','rejectSuggestion','ai-chat-controller-mouse-over','accepted','cloneNode','TrackChanges','6974105FEjjYg','addFeedInteractionHeader','resetConversationTitle','lastInteraction','isCurrentDocumentInConversation','createRange','sources','140QYaUBW','AIChatUI','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','ai.chat.models.defaultModelId','applySuggestion','_handleStartConversation','anchorId','dislike','removeSelectionFromChatContext','_batchToChanges','populateSourceResourceBalloon','16203121mDhpnQ','startAutoScroll','clearConversationContextUI','addContextOptionsChanged','toString','modelSelected','interactionStarted','config','_previewedChangeGroup','sourceId','hasChanges','plugins','static','setModel','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','AI_CHAT_UNABLE_TO_START_CONVERSATION','startInteraction','replyContentUpdated','addFilesToContext','stopListening','history','mouseLeaveSuggestion','resizedTabs','unshift','resourceStateChanged','addDocumentToContext','interactionFinished','model','handleRemovedConversation','split','forEach','_showConversationHistory','ai-chat-context-invalid-data','alignToTop','replies','setLoadingMessage','getDocumentContext','afterInit','removeMarker','messageId','load','selectedModel','contextItems','_setIsMaximized','updateCurrentDocumentInContext','resetMessageInput','data','revert','get','getConversation','end','AI_CHAT_RESOURCE_LOAD_FAILED','viewRangeToDom','sourcePosition','$graveyard','toggleWebSearch','isCurrentDocumentInContext','addSelectionToContext','DocumentCompare','howMany','_flushLastInteractionUI','stop','init','setFeedItemRenderingStrategy','getPath','ai.chat.context','ai-chat-source-resources-load-failed','resourceId','AI_CHAT_ABORTED_MESSAGE','open','from','loadConversation','getMarkersGroup','AI_BALLOON_HEADER_TITLE','Liked\x20response','children','view','capabilitiesUpdated','isStarted','contextItemAdded','ai-chat-context-file-too-large','updateFeedItemAIReplySuggestionContent','AITabs','_openBalloonFor','isOpen','content','enableControls','loadSourceResources','isModelAvailable','insertSuggestion','commands','sendMessage','resizeTabs','source','updateContent','_aiEditing','setIsUploadInProgress','AI_CHAT_GENERIC_ERROR','_removeFromContext','set','updateFeedItemAIReplySuggestionPartState','findIndex','sendUserMessage','error','resource','isInContext','_removeAISelectionMarkers','4325624HUnMhJ','setConversationContext','resize','contextItem','changes','_toggleReasoning','71486792eyNxDX','_handleUIUserMessage','fetchConversation','12HcjgYt','indexOf','delete','ai-chat-controller-no-active-conversation','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','locale','scrollFeedToSuggestion','AI_CHAT_CONTEXT_FILE_TOO_LARGE','updateConversationTitle','ready','ai-chat-conversation-start-failed','ai-chat-context-form-data-size-limits-exceeded','document','getDocumentData','undo','index','updateFeedItemAIReplySources','AIChatController','pending','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','1vgXGHA','_createFromRanges','version','setIsMaximized','isPremiumPlugin','ai-chat-resource-load-failed','_updateReplyContent','createPositionFromPath','chat','closeSourceResourceBalloon','full','startsWith','toggleSuggestionDisplayMode','getGroupId','ai-chat-context-unsupported-file-type','listenTo','AI_CHAT_CONTEXT_INVALID_DATA','editing','add','ai-chat-invalid-request','6abbnLT','getOperations','replyId','finishInteraction','getInteractionAndReplyById','push','getDiff','marker','addSelectionToChatContext','removeContextItem','abortPromptStream','ai.chat.models.displayedModels','maxOffset','modification-delta','toggleLoadingSkeleton','editors','getRanges','isUploadInProgress','focusPromptInput','webSearchStarted','contextItemRemoved','updateResourceState','collaboration.channelId','current-document','mouseOverSuggestion','isOfficialPlugin','indexes','updateCapabilities','_applyOperationsAsSuggestions','_scrollToSuggestionRange','removed','getContentParts','replyCreated','main','range','Disliked\x20response','Undo','dialogClosed','_integrateEditor','requires','conversationInitialized','resources','domConverter','has','setContextItemLoading','AIEditing','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','_getDocumentRangeForReplyChanges','ai-chat-file-upload-failed','_balloonShowDiff','remove','ai-no-track-changes','selectModel','removeSelectionFromContext','setChangeGroupState','text-delta','ai-chat-conversation-not-found','find','getSelectionText','Showing\x20conversation\x20history...','interactionCreated','outdated','parse','addFeedItemAIReply','message','map','baseVersion','_aiChatModels','uid','clearPendingContextUI','data-id','_applySuggestion','ai-request-aborted','_aiChatUi','path','updateFeedItemAIReplyContent','getInteraction','hideFakeVisualSelection'];_0x2fa2=function(){return _0xfaaec9;};return _0x2fa2();}import{CKEditorError as _0x467613,logError as _0x533e07,scrollViewportToShowTarget as _0x12e565,uid as _0x5f3022}from'ckeditor5/src/utils.js';import{AIConnector as _0x1be0a9}from'../aicore/aiconnector.js';import{AITabs as _0x47d958}from'../aitabs/aitabs.js';import{AIChatConversation as _0x303e02}from'./model/aichatconversation.js';import{getTranslation as _0x48e9f1}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3b7459}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x1b7888}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3ef6e5}from'./model/aichatmodels.js';import{getEditorFromContext as _0x2b7d60}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0xf9b9a3,DATA_ID_MODEL_ATTRIBUTE as _0x193346}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x4bcf55,getOperationsFromReply as _0x2f4b70}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x4fc5ba,getMinimalSelection as _0x38fec4}from'../aicore/utils/getsuggestionpartsfromreply.js';function _0x134b(_0x4efc8f,_0x13edd2){const _0x2fa29e=_0x2fa2();return _0x134b=function(_0x134bcd,_0x5ac1c8){_0x134bcd=_0x134bcd-0x1da;let _0x13600c=_0x2fa29e[_0x134bcd];return _0x13600c;},_0x134b(_0x4efc8f,_0x13edd2);}import{ModelRange as _0x2f8406,_DetachOperation as _0x5b77b1}from'ckeditor5/src/engine.js';import{findOne as _0x552680,getAttribute as _0x1879c2,serialize as _0x5cf332,Document as _0x4b6cd4,findByAttribute as _0x1deead}from'../aicore/utils/htmlparser.js';import{IconAI as _0x16cb59}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x33fc6e}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x22b587}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x145d9a{[_0x2bebe0(0x1fa)];[_0x2bebe0(0x2b2)];[_0x2bebe0(0x280)];[_0x2bebe0(0x27a)];[_0x2bebe0(0x308)]=new Map();[_0x2bebe0(0x312)]=null;[_0x2bebe0(0x268)]=!0x1;static get[_0x2bebe0(0x25e)](){return[_0x1be0a9,_0x22b587,_0xf9b9a3];}static get[_0x2bebe0(0x290)](){const _0x2e7049=_0x2bebe0;return _0x2e7049(0x220);}static get[_0x2bebe0(0x250)](){return!0x0;}static get[_0x2bebe0(0x227)](){return!0x0;}[_0x2bebe0(0x348)](){const _0x5bca80=_0x2bebe0;this[_0x5bca80(0x2b2)]=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x29f)),this[_0x5bca80(0x280)]=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x300)),this[_0x5bca80(0x1fa)]=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x264)),this[_0x5bca80(0x27a)]=new _0x3ef6e5({'connector':this[_0x5bca80(0x2b2)],'availableModels':this[_0x5bca80(0x2ac)][_0x5bca80(0x311)][_0x5bca80(0x33a)](_0x5bca80(0x242)),'defaultModelId':this[_0x5bca80(0x2ac)][_0x5bca80(0x311)][_0x5bca80(0x33a)](_0x5bca80(0x302))});const _0x86174c=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x1ed));this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2b1),()=>{const _0x1be438=_0x5bca80;this[_0x1be438(0x2f1)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x201),(_0x2a204c,_0x48f0e3)=>{const _0x42d994=_0x5bca80;this[_0x42d994(0x20d)]({'userMessage':_0x48f0e3});}),this[_0x5bca80(0x232)](_0x86174c,_0x5bca80(0x320),(_0x216d97,_0x5684a6)=>{const _0x5b168e=_0x5bca80;this[_0x5b168e(0x335)](_0x5684a6);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x1f7),()=>{const _0x42d0bd=_0x5bca80;_0x86174c[_0x42d0bd(0x208)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x241),async()=>{const _0x29132e=_0x5bca80;await this[_0x29132e(0x2ba)](),await this[_0x29132e(0x346)](),this[_0x29132e(0x307)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x323),()=>{const _0xb20886=_0x5bca80;this[_0xb20886(0x294)]?.[_0xb20886(0x2c8)](_0x48e9f1(this[_0xb20886(0x2ac)][_0xb20886(0x214)],_0xb20886(0x222)));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2c1),(_0x1f47e3,_0x4d7233)=>{const _0x5c5fbf=_0x5bca80;this[_0x5c5fbf(0x294)]?.[_0x5c5fbf(0x31c)](Array[_0x5c5fbf(0x1e1)](_0x4d7233));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x28b),(_0x4b4035,_0x7985a8)=>{const _0x522c4a=_0x5bca80;this[_0x522c4a(0x294)]?.[_0x522c4a(0x28b)](_0x7985a8);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2b7),(_0x506142,_0x3f772d)=>{const _0x48de17=_0x5bca80;this[_0x48de17(0x294)]?.[_0x48de17(0x2b7)](_0x3f772d[_0x48de17(0x1f8)],_0x3f772d[_0x48de17(0x203)]);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x240),(_0x31e323,_0x1a4eb0)=>{const _0x1c3ee6=_0x5bca80;this[_0x1c3ee6(0x1fd)](_0x1a4eb0);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x1f2),(_0x501876,_0x230664)=>{const _0x1a9c48=_0x5bca80;this[_0x1a9c48(0x294)]?.[_0x1a9c48(0x1f2)](_0x230664[_0x1a9c48(0x313)],_0x230664[_0x1a9c48(0x2f2)],_0x230664[_0x1a9c48(0x27b)]);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x341),()=>{const _0x302640=_0x5bca80;this[_0x302640(0x2c4)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2c5),()=>{const _0x147e2c=_0x5bca80;this[_0x147e2c(0x20b)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x26b),(_0x4372ec,_0x5bdb19)=>{const _0x4ab1c2=_0x5bca80;this[_0x4ab1c2(0x294)]?.[_0x4ab1c2(0x317)](_0x5bdb19);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2af),(_0x4d685f,{replyId:_0x32847d})=>{const _0x11e57a=_0x5bca80;console[_0x11e57a(0x289)](_0x11e57a(0x1e5),_0x32847d);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x306),(_0xb942ce,{replyId:_0x138d39})=>{const _0x88e99d=_0x5bca80;console[_0x88e99d(0x289)](_0x88e99d(0x25a),_0x138d39);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x1f4),(_0x24f529,_0x35fa11)=>{const _0x18f1a6=_0x5bca80;this[_0x18f1a6(0x2ac)][_0x18f1a6(0x315)][_0x18f1a6(0x33a)](_0x22b587)[_0x18f1a6(0x2dc)](),this[_0x18f1a6(0x2df)](_0x35fa11);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2d9),(_0x33f043,{replyId:_0x2d7de0,partIndex:_0x40338b})=>{const _0x54fd67=_0x5bca80;this[_0x54fd67(0x268)]=this[_0x54fd67(0x280)][_0x54fd67(0x2a2)],this[_0x54fd67(0x1ee)](_0x2d7de0,_0x40338b);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x24f),(_0x41ab60,{replyId:_0x462bb1,partIndex:_0x5c3dd0})=>{const _0x591519=_0x5bca80,_0x502146=this[_0x591519(0x266)](_0x462bb1,_0x5c3dd0);_0x502146&&_0x591519(0x340)!=_0x502146[_0x591519(0x259)][_0x591519(0x2a8)][_0x591519(0x292)]&&this[_0x591519(0x1fa)][_0x591519(0x2d1)]([_0x502146[_0x591519(0x259)]],_0x591519(0x2f4));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x31f),()=>{const _0x3967be=_0x5bca80;this[_0x3967be(0x1fa)][_0x3967be(0x284)](_0x3967be(0x2f4));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x303),(_0x10eafb,_0x46e24e)=>{const _0x4640a7=_0x5bca80;this[_0x4640a7(0x2ac)][_0x4640a7(0x315)][_0x4640a7(0x33a)](_0x22b587)[_0x4640a7(0x2dc)](),this[_0x4640a7(0x27e)](_0x46e24e);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x22f),async(_0xbcf4d8,{replyId:_0x37d695,showDiff:_0x186f19})=>{const _0x5bcf3d=_0x5bca80,{reply:_0xc523fe}=this[_0x5bcf3d(0x23b)](_0x37d695),_0x42caa7=_0xc523fe[_0x5bcf3d(0x256)]({'showDiff':_0x186f19});await this[_0x5bcf3d(0x280)][_0x5bcf3d(0x1ec)]({'id':_0xc523fe['id'],'parts':_0x42caa7,'renderingStrategy':_0x5bcf3d(0x316)});}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2f3),(_0x3dc6c6,{replyId:_0xe84c72,partIndex:_0x27dab0})=>{const _0x53c027=_0x5bca80;this[_0x53c027(0x312)]?.[_0x53c027(0x239)]==_0xe84c72&&this[_0x53c027(0x312)]?.[_0x53c027(0x2bb)]==_0x27dab0&&this[_0x53c027(0x2ac)][_0x53c027(0x315)][_0x53c027(0x33a)](_0x22b587)[_0x53c027(0x2dc)]();const {reply:_0x1c6dd7}=this[_0x53c027(0x23b)](_0xe84c72);_0x1c6dd7[_0x53c027(0x26d)](_0x27dab0,_0x53c027(0x2c7)),this[_0x53c027(0x1fa)][_0x53c027(0x284)](_0x53c027(0x2f4));});}async[_0x2bebe0(0x32f)](){const _0x3efee2=_0x2bebe0;this[_0x3efee2(0x2ac)]instanceof _0x5c386c?this[_0x3efee2(0x25d)](this[_0x3efee2(0x2ac)]):this[_0x3efee2(0x232)](this[_0x3efee2(0x2ac)][_0x3efee2(0x246)],_0x3efee2(0x235),(_0x202ef2,_0x269c11)=>{const _0x2ed093=_0x3efee2;_0x269c11['on'](_0x2ed093(0x218),()=>{const _0x2ebe28=_0x2ed093;this[_0x2ebe28(0x25d)](_0x269c11);});}),await this[_0x3efee2(0x2f1)]();}[_0x2bebe0(0x2df)](_0x4aea4a){const _0x5eb6b4=_0x2bebe0,_0x125b69=_0x2b7d60(this[_0x5eb6b4(0x2ac)]);if(!_0x125b69[_0x5eb6b4(0x315)][_0x5eb6b4(0x262)](_0x5eb6b4(0x2f7)))throw new _0x467613(_0x5eb6b4(0x26a),null);const _0x7bf533=this[_0x5eb6b4(0x2ac)][_0x5eb6b4(0x315)][_0x5eb6b4(0x33a)](_0x5eb6b4(0x344)),{reply:_0x36e0a0,interaction:_0x47376a}=this[_0x5eb6b4(0x23b)](_0x4aea4a[_0x5eb6b4(0x239)]),_0x220e02=this[_0x5eb6b4(0x266)](_0x4aea4a[_0x5eb6b4(0x239)],_0x4aea4a[_0x5eb6b4(0x2bb)]),_0x5470bb=void 0x0!==_0x4aea4a[_0x5eb6b4(0x2bb)]?[_0x36e0a0[_0x5eb6b4(0x2a7)][_0x4aea4a[_0x5eb6b4(0x2bb)]]]:_0x36e0a0[_0x5eb6b4(0x2a7)][_0x5eb6b4(0x2c9)](_0x404d6b=>_0x5eb6b4(0x221)==_0x404d6b[_0x5eb6b4(0x2cd)]),_0x475d72=_0x5470bb[_0x5eb6b4(0x278)](_0x100fe8=>_0x36e0a0[_0x5eb6b4(0x2a7)][_0x5eb6b4(0x210)](_0x100fe8));if(!_0x220e02||_0x5eb6b4(0x340)==_0x220e02[_0x5eb6b4(0x259)][_0x5eb6b4(0x2a8)][_0x5eb6b4(0x292)])return void _0x475d72[_0x5eb6b4(0x328)](_0x5a5a32=>_0x36e0a0[_0x5eb6b4(0x26d)](_0x5a5a32,_0x5eb6b4(0x274)));_0x475d72[_0x5eb6b4(0x328)](_0x551df9=>_0x36e0a0[_0x5eb6b4(0x26d)](_0x551df9,_0x5eb6b4(0x2f5)));const _0x157fd1=_0x2f4b70({'editor':_0x125b69,'reply':_0x36e0a0,'interaction':_0x47376a,'groups':_0x5470bb,'transform':!0x0,'documentCompare':_0x7bf533,'documentCompareOptions':{'anchor':_0x5eb6b4(0x258),'markDeletions':!0x0}});let _0x568f92;_0x220e02&&this[_0x5eb6b4(0x254)](_0x220e02[_0x5eb6b4(0x259)]),_0x125b69[_0x5eb6b4(0x325)][_0x5eb6b4(0x2a0)](_0x59b530=>{const _0x566724=_0x5eb6b4;_0x568f92=_0x59b530[_0x566724(0x29b)],_0x125b69[_0x566724(0x315)][_0x566724(0x33a)](_0x566724(0x2bf))[_0x566724(0x253)](_0x157fd1),this[_0x566724(0x1fa)][_0x566724(0x284)](_0x566724(0x2f4));}),this[_0x5eb6b4(0x308)][_0x5eb6b4(0x1fe)](_0x568f92,{'interactionId':_0x47376a['id'],'replyId':_0x36e0a0['id'],'indexes':_0x475d72[_0x5eb6b4(0x2d0)]()}),this[_0x5eb6b4(0x293)](_0x36e0a0);}[_0x2bebe0(0x27e)](_0x3b6967){const _0x1a95ce=_0x2bebe0,_0x4472f7=_0x2b7d60(this[_0x1a95ce(0x2ac)]),_0x320512=this[_0x1a95ce(0x2ac)][_0x1a95ce(0x315)][_0x1a95ce(0x33a)](_0xf9b9a3),{reply:_0x19b0e1,interaction:_0x4f30fb}=this[_0x1a95ce(0x23b)](_0x3b6967[_0x1a95ce(0x239)]),_0x1eb3bf=this[_0x1a95ce(0x266)](_0x3b6967[_0x1a95ce(0x239)],_0x3b6967[_0x1a95ce(0x2bb)]),_0x28f387=void 0x0!==_0x3b6967[_0x1a95ce(0x2bb)]?[_0x19b0e1[_0x1a95ce(0x2a7)][_0x3b6967[_0x1a95ce(0x2bb)]]]:_0x19b0e1[_0x1a95ce(0x2a7)][_0x1a95ce(0x2c9)](_0x155ef6=>_0x1a95ce(0x221)==_0x155ef6[_0x1a95ce(0x2cd)]),_0x291a53=_0x28f387[_0x1a95ce(0x278)](_0x1c8720=>_0x19b0e1[_0x1a95ce(0x2a7)][_0x1a95ce(0x210)](_0x1c8720));if(!_0x1eb3bf||_0x1a95ce(0x340)==_0x1eb3bf[_0x1a95ce(0x259)][_0x1a95ce(0x2a8)][_0x1a95ce(0x292)])return void _0x291a53[_0x1a95ce(0x328)](_0x35d013=>_0x19b0e1[_0x1a95ce(0x26d)](_0x35d013,_0x1a95ce(0x274)));_0x291a53[_0x1a95ce(0x328)](_0x2601f5=>_0x19b0e1[_0x1a95ce(0x26d)](_0x2601f5,_0x1a95ce(0x2f5)));const _0x493be0=_0x2f4b70({'editor':_0x4472f7,'reply':_0x19b0e1,'interaction':_0x4f30fb,'groups':_0x28f387,'transform':!0x0,'documentCompare':_0x320512,'documentCompareOptions':{'anchor':_0x1a95ce(0x258),'markDeletions':!0x1}});let _0xb05391;_0x1eb3bf&&this[_0x1a95ce(0x254)](_0x1eb3bf[_0x1a95ce(0x259)]),_0x4472f7[_0x1a95ce(0x325)][_0x1a95ce(0x2a0)](_0xa60dee=>{const _0x24187f=_0x1a95ce;_0xb05391=_0xa60dee[_0x24187f(0x29b)];for(const _0x2b1110 of _0x493be0)_0x2b1110[_0x24187f(0x279)]=_0x4472f7[_0x24187f(0x325)][_0x24187f(0x21b)][_0x24187f(0x225)],_0x4bcf55(_0x4472f7,_0x2b1110),_0xa60dee[_0x24187f(0x29b)][_0x24187f(0x28e)](_0x2b1110),_0x4472f7[_0x24187f(0x325)][_0x24187f(0x2ad)](_0x2b1110);}),this[_0x1a95ce(0x308)][_0x1a95ce(0x1fe)](_0xb05391,{'interactionId':_0x4f30fb['id'],'replyId':_0x19b0e1['id'],'indexes':_0x291a53[_0x1a95ce(0x2d0)]()}),this[_0x1a95ce(0x293)](_0x19b0e1);}[_0x2bebe0(0x1ee)](_0x91d214,_0x3ab1ae){const _0x3415a9=_0x2bebe0,_0x53e93d=_0x2b7d60(this[_0x3415a9(0x2ac)]),_0x4951cf=this[_0x3415a9(0x266)](_0x91d214,_0x3ab1ae),_0x1a37d3=this[_0x3415a9(0x2ac)][_0x3415a9(0x315)][_0x3415a9(0x33a)](_0x22b587);if(!_0x4951cf)return void _0x1a37d3[_0x3415a9(0x2dc)]();const {range:_0x2bf425,currentIndex:_0x38ae17}=_0x4951cf;if(_0x3415a9(0x340)==_0x2bf425[_0x3415a9(0x2a8)][_0x3415a9(0x292)]){const {reply:_0xd6700e}=this[_0x3415a9(0x23b)](_0x91d214);return _0xd6700e[_0x3415a9(0x26d)](_0x38ae17,_0x3415a9(0x274)),void _0x1a37d3[_0x3415a9(0x2dc)]();}if(this[_0x3415a9(0x312)]?.[_0x3415a9(0x239)]==_0x91d214&&this[_0x3415a9(0x312)]?.[_0x3415a9(0x2bb)]==_0x38ae17)return;this[_0x3415a9(0x31d)](_0x1a37d3),this[_0x3415a9(0x312)]={'replyId':_0x91d214,'partIndex':_0x38ae17};let _0x461fbd=_0x53e93d[_0x3415a9(0x311)][_0x3415a9(0x33a)](_0x3415a9(0x2de))||[..._0x1b7888];_0x53e93d[_0x3415a9(0x315)][_0x3415a9(0x262)](_0x3415a9(0x2f7))||(_0x461fbd=_0x461fbd[_0x3415a9(0x2c9)](_0xada24c=>_0x3415a9(0x1f4)!=_0xada24c));const _0x4b6825=new _0x33fc6e(_0x53e93d[_0x3415a9(0x214)],{'showDiff':this[_0x3415a9(0x268)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x3415a9(0x22d)},'hideHeader':!0x0,'availableActions':_0x461fbd});this[_0x3415a9(0x31d)](_0x4b6825);const {reply:_0x1eda2e}=this[_0x3415a9(0x23b)](_0x91d214),_0x4080b8=_0x1eda2e[_0x3415a9(0x256)]({'showDiff':this[_0x3415a9(0x268)]})[_0x3415a9(0x2c9)](_0x236692=>_0x236692[_0x3415a9(0x314)]),_0x27168b=_0x4080b8[_0x3415a9(0x200)](_0x1a6133=>_0x1a6133[_0x3415a9(0x21e)]==_0x38ae17);if(-0x1==_0x27168b)return;const _0x16e168=_0x4080b8[_0x27168b],_0x1caefe=_0x4080b8['at']((_0x27168b-0x1)%_0x4080b8[_0x3415a9(0x29a)])?.[_0x3415a9(0x21e)],_0x5146d3=_0x4080b8['at']((_0x27168b+0x1)%_0x4080b8[_0x3415a9(0x29a)])?.[_0x3415a9(0x21e)];_0x4b6825[_0x3415a9(0x1f9)]({'parts':[_0x16e168],'renderingStrategy':_0x3415a9(0x316)});const _0x1ad306=_0x38ae17!==_0x1caefe;this[_0x3415a9(0x254)](_0x2bf425,!0x0),_0x1a37d3[_0x3415a9(0x1e0)]({'index':_0x38ae17,'title':_0x48e9f1(this[_0x3415a9(0x2ac)][_0x3415a9(0x214)],_0x3415a9(0x1e4),(_0x27168b+0x1)[_0x3415a9(0x30e)]()),'icon':_0x16cb59,'mainView':_0x4b6825,'showRotator':_0x1ad306,'showApplyButton':!0x0,'showSuggestButton':_0x53e93d[_0x3415a9(0x315)][_0x3415a9(0x262)](_0x3415a9(0x2f7)),'ranges':[_0x2bf425]}),this[_0x3415a9(0x280)][_0x3415a9(0x215)](_0x91d214,_0x38ae17),this[_0x3415a9(0x232)](_0x4b6825,_0x3415a9(0x22f),(_0x3d540e,{showDiff:_0x2120eb})=>{const _0x53c10a=_0x3415a9;this[_0x53c10a(0x268)]=_0x2120eb;const {reply:_0x4f41f8}=this[_0x53c10a(0x23b)](_0x91d214),_0x1fcd02=_0x4f41f8[_0x53c10a(0x256)]({'showDiff':_0x2120eb,'groupIndex':_0x38ae17});_0x4b6825[_0x53c10a(0x1f9)]({'parts':_0x1fcd02,'renderingStrategy':_0x53c10a(0x316)});}),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x303),()=>{const _0x378bd1=_0x3415a9;this[_0x378bd1(0x27e)]({'replyId':_0x91d214,'partIndex':_0x38ae17}),_0x1ad306?this[_0x378bd1(0x1ee)](_0x91d214,_0x5146d3):_0x1a37d3[_0x378bd1(0x2dc)]();}),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x1f4),()=>{const _0x8d9dea=_0x3415a9;this[_0x8d9dea(0x2df)]({'replyId':_0x91d214,'partIndex':_0x38ae17}),_0x1ad306?this[_0x8d9dea(0x1ee)](_0x91d214,_0x5146d3):_0x1a37d3[_0x8d9dea(0x2dc)]();}),_0x1ad306&&(this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x2d6),()=>{const _0x1b077c=_0x3415a9;this[_0x1b077c(0x1ee)](_0x91d214,_0x5146d3);}),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x2d8),()=>{const _0x4622ae=_0x3415a9;this[_0x4622ae(0x1ee)](_0x91d214,_0x1caefe);})),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x25c),()=>{const _0xec71a9=_0x3415a9;this[_0xec71a9(0x31d)](_0x1a37d3),this[_0xec71a9(0x31d)](_0x4b6825),this[_0xec71a9(0x312)]=null;});}[_0x2bebe0(0x266)](_0x5cf1a7,_0x4280c0){const _0x542bd1=_0x2bebe0,_0x4f3190=_0x2b7d60(this[_0x542bd1(0x2ac)]),{reply:_0x12830a,interaction:_0x328765}=this[_0x542bd1(0x23b)](_0x5cf1a7),_0x8fdd65=_0x12830a[_0x542bd1(0x2a7)][_0x542bd1(0x2c9)](_0x23362f=>_0x542bd1(0x221)==_0x23362f[_0x542bd1(0x2cd)]),_0x186037=_0x8fdd65[_0x542bd1(0x278)](_0x44cbd2=>_0x12830a[_0x542bd1(0x2a7)][_0x542bd1(0x210)](_0x44cbd2));void 0x0===_0x4280c0&&(_0x4280c0=_0x186037[0x0]);const _0x2bdf98=_0x186037[_0x542bd1(0x210)](_0x4280c0);if(-0x1==_0x2bdf98)return null;const _0x351c2f=_0x8fdd65[_0x2bdf98],_0x4b9636=new _0x4b6cd4([]),_0x31470e=new _0x4b6cd4([]);for(const _0x65679a of _0x351c2f[_0x542bd1(0x20a)])if(_0x542bd1(0x255)!=_0x65679a[_0x542bd1(0x2dd)]&&_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x65679a[_0x542bd1(0x2a3)][_0x542bd1(0x2f6)](!0x0)),_0x542bd1(0x2e2)!=_0x65679a[_0x542bd1(0x2dd)]){const _0x7c1b5a=_0x552680(_0x23163e=>_0x1879c2(_0x23163e,_0x542bd1(0x27d))==_0x65679a['id'],_0x12830a[_0x542bd1(0x2ce)],!0x0);_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x7c1b5a[_0x542bd1(0x2f6)](!0x0));}if(0x0==_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x29a)]){if(_0x351c2f[_0x542bd1(0x20a)][0x0][_0x542bd1(0x305)]){const _0x338493=_0x1deead(_0x542bd1(0x27d),_0x351c2f[_0x542bd1(0x20a)][0x0][_0x542bd1(0x305)],_0x12830a[_0x542bd1(0x2ce)]);_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x321)](_0x338493[_0x542bd1(0x2f6)](!0x0)),_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x321)](_0x338493[_0x542bd1(0x2f6)](!0x0)),_0x338493[_0x542bd1(0x287)]&&(_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x338493[_0x542bd1(0x287)][_0x542bd1(0x2f6)](!0x0)),_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x338493[_0x542bd1(0x287)][_0x542bd1(0x2f6)](!0x0)));}else{const _0x27b65d=_0x12830a[_0x542bd1(0x2ce)][_0x542bd1(0x1e6)][0x0];if(!_0x27b65d)return null;_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x27b65d[_0x542bd1(0x2f6)](!0x0)),_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x27b65d[_0x542bd1(0x2f6)](!0x0));}}const _0xc13eca=_0x328765[_0x542bd1(0x32e)](),_0xb95629=_0x4f3190[_0x542bd1(0x338)][_0x542bd1(0x275)](_0xc13eca[_0x542bd1(0x1f0)]),_0x1d8515=_0x5cf332(_0x4b9636),_0x4c6cc1=_0x4f3190[_0x542bd1(0x338)][_0x542bd1(0x275)](_0x1d8515),_0x3a9e30=_0x4f3190[_0x542bd1(0x338)][_0x542bd1(0x275)](_0x1d8515),_0x5750f0=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2a9)](_0x4c6cc1,0x0),_0x6080cb=_0x5cf332(_0x31470e),_0x254f3d={'anchor':_0x5750f0,'markDeletions':!0x1},_0x249291=_0x4f3190[_0x542bd1(0x315)][_0x542bd1(0x33a)](_0xf9b9a3)[_0x542bd1(0x23d)](_0x1d8515,_0x6080cb,_0x254f3d)[_0x542bd1(0x238)]();if(!_0x249291[_0x542bd1(0x29a)])return null;_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2a0)](_0x5a0f2a=>{const _0x4840de=_0x542bd1;for(const _0x463838 of _0x249291)if(_0x4840de(0x269)==_0x463838[_0x4840de(0x2dd)]){const _0x41d4c7=_0x463838[_0x4840de(0x33f)],_0x2f84c0=_0x463838[_0x4840de(0x345)],_0x172ba3=new _0x5b77b1(_0x41d4c7,_0x2f84c0);_0x5a0f2a[_0x4840de(0x29b)][_0x4840de(0x28e)](_0x172ba3),_0x4f3190[_0x4840de(0x325)][_0x4840de(0x2ad)](_0x172ba3);}else _0x4840de(0x23e)!==_0x463838[_0x4840de(0x2dd)]&&(_0x463838[_0x4840de(0x279)]=null,_0x463838[_0x4840de(0x2f0)]=!0x1,_0x5a0f2a[_0x4840de(0x29b)][_0x4840de(0x28e)](_0x463838),_0x4f3190[_0x4840de(0x325)][_0x4840de(0x2ad)](_0x463838));});const _0x2a1baa=_0x38fec4(_0x4f3190,_0x249291,_0x4c6cc1);_0x4fc5ba(_0x4f3190[_0x542bd1(0x325)],_0x2a1baa);const _0x26d7c8=_0x2a1baa[_0x542bd1(0x2e1)]()[_0x542bd1(0x2c0)][_0x542bd1(0x281)][_0x542bd1(0x2d0)](),_0x1bffc5=_0x2a1baa[_0x542bd1(0x2e1)]()[_0x542bd1(0x33c)][_0x542bd1(0x281)][_0x542bd1(0x2d0)](),_0x5d9850=[];let _0x2a418a=_0x4c6cc1,_0x3340bb=_0x3a9e30;for(let _0x4aabe7=0x0;_0x4aabe7<_0x1bffc5[_0x542bd1(0x29a)];_0x4aabe7++){const _0x2044bb=_0x2a418a[_0x542bd1(0x243)]-_0x1bffc5[_0x4aabe7];_0x5d9850[_0x4aabe7]=_0x3340bb[_0x542bd1(0x243)]-_0x2044bb,_0x2a418a=_0x2a418a[_0x542bd1(0x297)](_0x1bffc5[_0x4aabe7]),_0x3340bb=_0x3340bb[_0x542bd1(0x297)](_0x5d9850[_0x4aabe7]);}const _0x2dd431=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2fd)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x3a9e30,_0x26d7c8),_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x3a9e30,_0x5d9850)),_0x3a3360=_0x3a9e30[_0x542bd1(0x2ca)](0x0)[_0x542bd1(0x299)](_0x193346),_0x10397f=Array[_0x542bd1(0x1e1)](_0xb95629[_0x542bd1(0x29c)]())[_0x542bd1(0x270)](_0x27d421=>_0x27d421[_0x542bd1(0x299)](_0x193346)==_0x3a3360)[_0x542bd1(0x1db)](),_0xc4a352=_0x2dd431[_0x542bd1(0x2c0)][_0x542bd1(0x281)][_0x542bd1(0x2d0)](),_0x22c1ee=_0x2dd431[_0x542bd1(0x33c)][_0x542bd1(0x281)][_0x542bd1(0x2d0)]();_0xc4a352[0x0]=_0x10397f[0x0]+_0xc4a352[0x0],_0x22c1ee[0x0]=_0x10397f[0x0]+_0x22c1ee[0x0];let _0x1102bb=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2fd)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x21b)][_0x542bd1(0x2d2)](),_0xc4a352),_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x21b)][_0x542bd1(0x2d2)](),_0x22c1ee));const _0x3ecc4a=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x21b)][_0x542bd1(0x31e)][_0x542bd1(0x238)](_0xc13eca[_0x542bd1(0x225)]);for(const _0x277abd of _0x3ecc4a)_0x1102bb=_0x2f8406[_0x542bd1(0x224)](_0x1102bb[_0x542bd1(0x2da)](_0x277abd));return{'range':_0x1102bb,'currentIndex':_0x4280c0};}[_0x2bebe0(0x25d)](_0x1fac8c){const _0x4c0b5d=_0x2bebe0;if(!_0x1fac8c[_0x4c0b5d(0x315)][_0x4c0b5d(0x262)](_0x4c0b5d(0x25b)))return;const _0x30fff7=_0x1fac8c[_0x4c0b5d(0x1f5)][_0x4c0b5d(0x33a)](_0x4c0b5d(0x21d)),_0xbdadc0=_0x1fac8c[_0x4c0b5d(0x1f5)][_0x4c0b5d(0x33a)](_0x4c0b5d(0x291));this[_0x4c0b5d(0x232)](_0x30fff7,_0x4c0b5d(0x339),(_0x1f8bf2,_0x4bc94c,_0x301eb2)=>{const _0x20181f=_0x4c0b5d,_0x3547e9=this[_0x20181f(0x308)][_0x20181f(0x33a)](_0x4bc94c);if(!_0x3547e9)return;const _0x55e5b2=this[_0x20181f(0x294)][_0x20181f(0x283)](_0x3547e9[_0x20181f(0x2bd)])[_0x20181f(0x2cf)](_0x3547e9[_0x20181f(0x239)]);_0x3547e9[_0x20181f(0x251)][_0x20181f(0x328)](_0x35d3bb=>_0x55e5b2[_0x20181f(0x26d)](_0x35d3bb,_0x20181f(0x221))),this[_0x20181f(0x308)][_0x20181f(0x211)](_0x4bc94c),this[_0x20181f(0x308)][_0x20181f(0x1fe)](_0x301eb2,_0x3547e9);}),this[_0x4c0b5d(0x232)](_0xbdadc0,_0x4c0b5d(0x339),(_0x282186,_0x26887f,_0x5b1d90)=>{const _0x3b9a10=_0x4c0b5d,_0x4de195=this[_0x3b9a10(0x308)][_0x3b9a10(0x33a)](_0x26887f);if(!_0x4de195)return;const _0x2130c8=this[_0x3b9a10(0x294)][_0x3b9a10(0x283)](_0x4de195[_0x3b9a10(0x2bd)])[_0x3b9a10(0x2cf)](_0x4de195[_0x3b9a10(0x239)]);_0x4de195[_0x3b9a10(0x251)][_0x3b9a10(0x328)](_0x40df1e=>_0x2130c8[_0x3b9a10(0x26d)](_0x40df1e,_0x3b9a10(0x2f5))),this[_0x3b9a10(0x308)][_0x3b9a10(0x211)](_0x26887f),this[_0x3b9a10(0x308)][_0x3b9a10(0x1fe)](_0x5b1d90,_0x4de195);});}async[_0x2bebe0(0x1e2)](_0x498b6c){const _0x55349d=_0x2bebe0;this[_0x55349d(0x2ac)][_0x55349d(0x315)][_0x55349d(0x33a)](_0x22b587)[_0x55349d(0x2dc)](),this[_0x55349d(0x280)][_0x55349d(0x1da)](_0x55349d(0x316)),this[_0x55349d(0x280)][_0x55349d(0x245)](!0x0),await this[_0x55349d(0x2ba)]();try{await this[_0x55349d(0x2b2)][_0x55349d(0x20e)](_0x498b6c)[_0x55349d(0x33b)](),await this[_0x55349d(0x2f1)](_0x498b6c),this[_0x55349d(0x217)]('\x20');const {sessionId:_0x5f4140}=this[_0x55349d(0x1fa)][_0x55349d(0x21c)]();await this[_0x55349d(0x294)][_0x55349d(0x332)](_0x498b6c,_0x5f4140),this[_0x55349d(0x294)][_0x55349d(0x2fc)]()&&this[_0x55349d(0x294)][_0x55349d(0x2c8)](_0x48e9f1(this[_0x55349d(0x2ac)][_0x55349d(0x214)],_0x55349d(0x222)));}catch(_0x5841ed){this[_0x55349d(0x280)][_0x55349d(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x55349d(0x2ac)][_0x55349d(0x214)],_0x55349d(0x265)),'id':_0x498b6c}),this[_0x55349d(0x2d7)](new _0x467613(_0x55349d(0x26f),this,{'error':_0x5841ed}));}finally{this[_0x55349d(0x2ac)][_0x55349d(0x315)][_0x55349d(0x33a)](_0x47d958)[_0x55349d(0x1e7)][_0x55349d(0x2ae)](_0x55349d(0x22b)),this[_0x55349d(0x280)][_0x55349d(0x30b)](),this[_0x55349d(0x280)][_0x55349d(0x1da)](_0x55349d(0x2e8)),this[_0x55349d(0x280)][_0x55349d(0x245)](!0x1);}}[_0x2bebe0(0x326)](_0x524017){const _0x488a50=_0x2bebe0;this[_0x488a50(0x294)]['id']===_0x524017&&this[_0x488a50(0x2f1)]();}async[_0x2bebe0(0x23f)](){const _0x1bf4b3=_0x2bebe0,_0x465c5f=this[_0x1bf4b3(0x1fa)][_0x1bf4b3(0x271)]();this[_0x1bf4b3(0x294)]?.[_0x1bf4b3(0x343)](_0x465c5f),this[_0x1bf4b3(0x294)]?.[_0x1bf4b3(0x2c8)](_0x48e9f1(this[_0x1bf4b3(0x2ac)][_0x1bf4b3(0x214)],_0x1bf4b3(0x222)));}[_0x2bebe0(0x307)](){const _0xacef4b=_0x2bebe0;this[_0xacef4b(0x294)]?.[_0xacef4b(0x26c)]();}[_0x2bebe0(0x249)](){const _0x4d611f=_0x2bebe0;this[_0x4d611f(0x280)][_0x4d611f(0x249)]();}async[_0x2bebe0(0x2b1)](){const _0x576d15=_0x2bebe0;await this[_0x576d15(0x2f1)]();}async[_0x2bebe0(0x1f6)]({message:_0x2e5fe6,quickActionData:_0x284483}){const _0x31ca0b=_0x2bebe0;await this[_0x31ca0b(0x20d)]({'userMessage':_0x2e5fe6,'quickActionData':_0x284483});}[_0x2bebe0(0x230)](){const _0x11ac47=_0x2bebe0,_0x517092=this[_0x11ac47(0x2ac)][_0x11ac47(0x311)][_0x11ac47(0x33a)](_0x11ac47(0x24d));if(!_0x517092)throw new _0x467613(_0x11ac47(0x2a5),this);return _0x517092;}async[_0x2bebe0(0x2f1)](_0x2af3f8){const _0x3ad3ea=_0x2bebe0;try{this[_0x3ad3ea(0x280)][_0x3ad3ea(0x1f1)](),await this[_0x3ad3ea(0x304)](_0x2af3f8);}catch(_0x18b8d5){_0x533e07(_0x3ad3ea(0x219),_0x18b8d5),this[_0x3ad3ea(0x294)]=void 0x0,this[_0x3ad3ea(0x280)][_0x3ad3ea(0x2d4)]();}}async[_0x2bebe0(0x304)](_0x62d1e2){const _0x13802d=_0x2bebe0,_0x1c4a1b=this[_0x13802d(0x2ac)][_0x13802d(0x315)][_0x13802d(0x33a)](_0x22b587);let _0x210e55;_0x1c4a1b[_0x13802d(0x1ef)]&&_0x1c4a1b[_0x13802d(0x2dc)](),_0x62d1e2||!this[_0x13802d(0x294)]?_0x210e55=this[_0x13802d(0x2ac)][_0x13802d(0x311)][_0x13802d(0x33a)](_0x13802d(0x302)):this[_0x13802d(0x280)][_0x13802d(0x1f3)]&&(_0x210e55=this[_0x13802d(0x294)][_0x13802d(0x333)]['id']),await this[_0x13802d(0x2ba)]();const _0xb3dc0e=this[_0x13802d(0x230)](),_0xc03ed=_0x62d1e2||_0x5f3022();this[_0x13802d(0x294)]=new _0x303e02({'connector':this[_0x13802d(0x2b2)],'chatModels':this[_0x13802d(0x27a)],'selectedModelId':_0x210e55,'conversationId':_0xc03ed,'group':_0xb3dc0e,'getEditor':()=>_0x2b7d60(this[_0x13802d(0x2ac)])}),this[_0x13802d(0x294)]['on'](_0x13802d(0x25f),(_0x4e3633,_0xaa8d82)=>{const _0x27ce9b=_0x13802d;this[_0x27ce9b(0x280)][_0x27ce9b(0x2ef)](_0xaa8d82),this[_0x27ce9b(0x280)][_0x27ce9b(0x337)](),this[_0x27ce9b(0x280)][_0x27ce9b(0x27c)](),this[_0x27ce9b(0x280)][_0x27ce9b(0x30c)](),_0x62d1e2||(this[_0x27ce9b(0x280)][_0x27ce9b(0x2fa)](),this[_0x27ce9b(0x294)]?.[_0x27ce9b(0x2c8)](_0x48e9f1(this[_0x27ce9b(0x2ac)][_0x27ce9b(0x214)],_0x27ce9b(0x222))));}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e6),(_0x399f55,_0x29146b)=>{const _0x1aef3c=_0x13802d;this[_0x1aef3c(0x280)][_0x1aef3c(0x1fb)](_0x29146b[_0x1aef3c(0x248)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x273),(_0x2e56e7,_0x556a88)=>{const _0x1d5f99=_0x13802d;this[_0x1d5f99(0x280)][_0x1d5f99(0x2ea)](_0x556a88);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x24a),()=>{const _0x2692a6=_0x13802d;this[_0x2692a6(0x280)][_0x2692a6(0x32d)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2c3),()=>{const _0x411c0d=_0x13802d;this[_0x411c0d(0x280)][_0x411c0d(0x32d)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x29e),(_0x3d4c8f,_0x1579df)=>{const _0x37149f=_0x13802d;this[_0x37149f(0x280)][_0x37149f(0x2f9)](_0x1579df,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e4),(_0x5646f7,_0x46d862)=>{const _0x3a8ece=_0x13802d;this[_0x3a8ece(0x280)][_0x3a8ece(0x2f9)](_0x46d862,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x310),()=>{const _0x25ba01=_0x13802d;this[_0x25ba01(0x280)][_0x25ba01(0x31a)]();}),this[_0x13802d(0x294)]['on'](_0x13802d(0x324),async()=>{const _0x335d1c=_0x13802d;await this[_0x335d1c(0x280)][_0x335d1c(0x23a)]();}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2b5),(_0x4f26ae,_0x3eee1e)=>{const _0x1fb4bd=_0x13802d;this[_0x1fb4bd(0x280)][_0x1fb4bd(0x2bc)](_0x3eee1e['id']);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e5),(_0x197318,_0x58f128,_0x3125f3)=>{const _0x3136aa=_0x13802d;this[_0x3136aa(0x217)](_0x58f128,_0x3125f3);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x257),(_0x420771,_0x24736e)=>{const _0x587a68=_0x13802d;_0x587a68(0x26e)===_0x24736e[_0x587a68(0x2dd)]?this[_0x587a68(0x280)][_0x587a68(0x276)](_0x24736e):this[_0x587a68(0x280)][_0x587a68(0x2be)](_0x24736e);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x31b),async(_0x3c07ee,_0x4629eb)=>{const _0x4f40df=_0x13802d;await this[_0x4f40df(0x229)]({'reply':_0x4629eb});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x286),(_0x5cebe1,{reply:_0x249a18,index:_0x4fbf96,state:_0x318dbb})=>{const _0x308ae8=_0x13802d;this[_0x308ae8(0x280)][_0x308ae8(0x1ff)]({'id':_0x249a18['id'],'index':_0x4fbf96,'state':_0x318dbb});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x1ea),(_0x9aca1,_0xfd6813)=>{const _0x246971=_0x13802d;if(this[_0x246971(0x280)][_0x246971(0x295)](_0xfd6813[_0x246971(0x209)],_0xfd6813[_0x246971(0x296)]),_0x246971(0x2b4)===_0xfd6813[_0x246971(0x209)][_0x246971(0x2dd)]){const _0x1a46f4=[..._0x2b7d60(this[_0x246971(0x2ac)])[_0x246971(0x325)][_0x246971(0x21b)][_0x246971(0x2b4)][_0x246971(0x247)]()];this[_0x246971(0x1fa)][_0x246971(0x2d1)](_0x1a46f4,_0x246971(0x2ab)+this[_0x246971(0x294)]?.['id']);}}),this[_0x13802d(0x294)]['on'](_0x13802d(0x24b),(_0x4b5146,_0x5c7414)=>{const _0x2d961f=_0x13802d;this[_0x2d961f(0x280)][_0x2d961f(0x240)](_0x5c7414[_0x2d961f(0x2cc)]),_0x2d961f(0x24e)==_0x5c7414[_0x2d961f(0x2cc)]&&this[_0x2d961f(0x307)](),_0x2d961f(0x2b4)===_0x5c7414[_0x2d961f(0x2dd)]&&this[_0x2d961f(0x1fa)][_0x2d961f(0x284)](_0x2d961f(0x2ab)+this[_0x2d961f(0x294)]?.['id']);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2a1),(_0x5e024f,_0x9f54b7)=>{const _0x23acf1=_0x13802d;this[_0x23acf1(0x280)][_0x23acf1(0x263)](_0x9f54b7[_0x23acf1(0x209)][_0x23acf1(0x2cc)],_0x9f54b7[_0x23acf1(0x296)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e7),(_0x4248eb,_0x465a4c)=>{const _0xd4fc92=_0x13802d;this[_0xd4fc92(0x280)][_0xd4fc92(0x207)](_0x465a4c[_0xd4fc92(0x334)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x30d),(_0x14b715,_0x422100)=>{const _0xf282d0=_0x13802d;this[_0xf282d0(0x280)][_0xf282d0(0x2cb)](_0x422100[_0xf282d0(0x2e9)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2ed),(_0x19c34d,_0x36f1fc)=>{const _0x2c71b0=_0x13802d;this[_0x2c71b0(0x280)][_0x2c71b0(0x309)](_0x36f1fc[_0x2c71b0(0x313)],_0x36f1fc[_0x2c71b0(0x1f8)],_0x36f1fc[_0x2c71b0(0x260)],_0x36f1fc[_0x2c71b0(0x27b)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x322),(_0x5bf621,_0x3bdf9b)=>{const _0x3a6e9f=_0x13802d;this[_0x3a6e9f(0x280)][_0x3a6e9f(0x24c)](_0x3bdf9b[_0x3a6e9f(0x313)],_0x3bdf9b[_0x3a6e9f(0x1de)],_0x3bdf9b[_0x3a6e9f(0x204)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x1e8),(_0x32c273,_0x4c90eb)=>{const _0x33af46=_0x13802d;this[_0x33af46(0x280)][_0x33af46(0x252)](_0x4c90eb);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x30f),(_0x1246fa,_0x3d3062)=>{const _0x9aebb6=_0x13802d;this[_0x9aebb6(0x280)][_0x9aebb6(0x285)](_0x3d3062[_0x9aebb6(0x333)],_0x3d3062[_0x9aebb6(0x2b6)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x202),(_0x2a4e74,{error:_0x241d04,interactionId:_0x1641c1,fileName:_0x5f3d2d,url:_0x3971a1,sourceId:_0x3fee28,sourceLabel:_0x59768d})=>{const _0x3c8035=_0x13802d,_0x6adfe8=_0x1641c1?_0x1641c1+':'+_0x5f3022():_0x5f3022();_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x27f))?this[_0x3c8035(0x280)][_0x3c8035(0x2a6)]({'staticMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x1df)),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x28f))||_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x219))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x319)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x267))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x28c),_0x5f3d2d),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x2a4))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x2aa),_0x3971a1),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x32a))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x233)),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x28d))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x2eb)),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x1dd))?(_0x3fee28&&this[_0x3c8035(0x280)][_0x3c8035(0x22c)](_0x3fee28),this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x213),_0x59768d||_0x3c8035(0x1f8)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x228))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x33d)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x236))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x28a)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x231))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x301)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x1eb))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x216)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x2e0))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x318)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x21a))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x2b8)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x1fc)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04));}),await this[_0x13802d(0x294)][_0x13802d(0x348)](this[_0x13802d(0x2ac)][_0x13802d(0x311)][_0x13802d(0x33a)](_0x13802d(0x1dc))),_0x62d1e2||await this[_0x13802d(0x294)][_0x13802d(0x2c0)]();}async[_0x2bebe0(0x20d)]({userMessage:_0x6d2500,quickActionData:_0x1e9b39}){const _0x129501=_0x2bebe0;if(!this[_0x129501(0x294)])throw new _0x467613(_0x129501(0x212));this[_0x129501(0x294)][_0x129501(0x342)]()&&await this[_0x129501(0x294)][_0x129501(0x336)](this[_0x129501(0x1fa)][_0x129501(0x21c)]()),this[_0x129501(0x294)]['id']&&this[_0x129501(0x294)][_0x129501(0x1e9)]&&await this[_0x129501(0x294)][_0x129501(0x2ee)]({'userMessage':_0x6d2500,'quickActionData':_0x1e9b39}),this[_0x129501(0x205)]();}[_0x2bebe0(0x205)](){const _0x54492b=_0x2bebe0,_0x20e647=_0x2b7d60(this[_0x54492b(0x2ac)])[_0x54492b(0x325)],_0x571b62=Array[_0x54492b(0x1e1)](_0x20e647[_0x54492b(0x2b0)][_0x54492b(0x1e3)](_0x3b7459));_0x20e647[_0x54492b(0x2a0)](_0x4474c8=>{const _0x58c734=_0x54492b;_0x571b62[_0x58c734(0x328)](_0x375beb=>_0x4474c8[_0x58c734(0x330)](_0x375beb));});}[_0x2bebe0(0x329)](){const _0x57c277=_0x2bebe0;console[_0x57c277(0x289)](_0x57c277(0x272));}[_0x2bebe0(0x335)](_0x5b8df9){const _0x1dbd1a=_0x2bebe0;this[_0x1dbd1a(0x280)][_0x1dbd1a(0x226)](_0x5b8df9);}[_0x2bebe0(0x2d7)](_0x438125){const _0x2563e3=_0x2bebe0;_0x533e07(_0x438125[_0x2563e3(0x277)]);}[_0x2bebe0(0x1fd)](_0x2f1c7d){const _0xf2df7=_0x2bebe0;this[_0xf2df7(0x294)]?.[_0xf2df7(0x298)](_0x2f1c7d);}[_0x2bebe0(0x2c4)](){const _0x2b4da4=_0x2bebe0;this[_0x2b4da4(0x294)]?.[_0x2b4da4(0x341)]();}[_0x2bebe0(0x20b)](){const _0x4a64d4=_0x2bebe0;this[_0x4a64d4(0x294)]?.[_0x4a64d4(0x2c5)]();}[_0x2bebe0(0x23b)](_0x32033f){const _0x58020e=_0x2bebe0,[_0x710cf,_0x443f2e]=_0x32033f[_0x58020e(0x327)](':'),_0x36a6bc=this[_0x58020e(0x294)][_0x58020e(0x283)](_0x710cf),_0xd85726=_0x36a6bc[_0x58020e(0x2cf)](_0x443f2e);return{'interaction':_0x36a6bc,'reply':_0xd85726};}[_0x2bebe0(0x254)](_0x58cf66,_0x2bcc2a=!0x1){const _0x4c88d3=_0x2bebe0,_0x43aa6a=_0x2b7d60(this[_0x4c88d3(0x2ac)]),_0x32dd32={'target':_0x43aa6a[_0x4c88d3(0x234)][_0x4c88d3(0x1e7)][_0x4c88d3(0x261)][_0x4c88d3(0x33e)](_0x43aa6a[_0x4c88d3(0x234)][_0x4c88d3(0x2db)][_0x4c88d3(0x288)](_0x58cf66)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x2bcc2a};_0x2bcc2a&&(_0x32dd32[_0x4c88d3(0x32b)]=!0x0),_0x12e565(_0x32dd32);}[_0x2bebe0(0x217)](_0x3a7434,_0x59c2e6=!0x1){const _0xd2fc3e=_0x2bebe0;this[_0xd2fc3e(0x280)][_0xd2fc3e(0x2e5)](_0x3a7434||_0x48e9f1(this[_0xd2fc3e(0x2ac)][_0xd2fc3e(0x214)],_0xd2fc3e(0x2c6)),_0x59c2e6);}async[_0x2bebe0(0x229)]({reply:_0xdd0a77,renderingStrategy:_0x436df3}){const _0x2f9b49=_0x2bebe0,{id:_0x56d0ff,isDone:_0x20ea97,type:_0x470d53,parsedContent:_0xe88ee5}=_0xdd0a77;if(_0x2f9b49(0x244)===_0x470d53){const _0x446327=_0xdd0a77[_0x2f9b49(0x256)]({'showDiff':this[_0x2f9b49(0x280)][_0x2f9b49(0x2a2)]});await this[_0x2f9b49(0x280)][_0x2f9b49(0x1ec)]({'id':_0x56d0ff,'parts':_0x446327,'renderingStrategy':_0x436df3,'isDone':_0x20ea97});}else _0x2f9b49(0x26e)===_0x470d53&&await this[_0x2f9b49(0x280)][_0x2f9b49(0x282)]({'id':_0x56d0ff,'parsedContent':_0xe88ee5,'renderingStrategy':_0x436df3,'isDone':_0x20ea97});_0x20ea97&&_0xdd0a77[_0x2f9b49(0x2fe)][_0x2f9b49(0x29a)]>0x0&&this[_0x2f9b49(0x280)][_0x2f9b49(0x21f)](_0x56d0ff,_0xdd0a77[_0x2f9b49(0x2fe)]);}async[_0x2bebe0(0x2ba)](){const _0x3dd414=_0x2bebe0,_0x4781fa=this[_0x3dd414(0x294)]?.[_0x3dd414(0x2fb)];_0x4781fa&&(_0x4781fa[_0x3dd414(0x347)](),this[_0x3dd414(0x280)][_0x3dd414(0x2b3)](_0x4781fa));}async[_0x2bebe0(0x346)](){const _0x339c48=_0x2bebe0,_0x30ddbd=this[_0x339c48(0x294)]?.[_0x339c48(0x2fb)];if(_0x30ddbd){for await(const _0x24c971 of _0x30ddbd[_0x339c48(0x32c)])await this[_0x339c48(0x229)]({'reply':_0x24c971,'renderingStrategy':_0x339c48(0x316)});}}[_0x2bebe0(0x293)](_0x230f31){const _0x46a62e=_0x2bebe0,_0x23a568={'positiveCount':_0x230f31[_0x46a62e(0x2a7)][_0x46a62e(0x2c9)](_0x5e524c=>_0x46a62e(0x2f5)===_0x5e524c[_0x46a62e(0x2cd)])[_0x46a62e(0x29a)],'totalCount':_0x230f31[_0x46a62e(0x2a7)][_0x46a62e(0x29a)],'modificationId':_0x230f31['id']},_0xe41ab5=this[_0x46a62e(0x294)][_0x46a62e(0x283)](_0x230f31[_0x46a62e(0x2bd)])[_0x46a62e(0x331)];this[_0x46a62e(0x2b2)][_0x46a62e(0x2d5)](this[_0x46a62e(0x294)]['id'],_0xe41ab5,_0x23a568);}}
|
|
23
|
+
function _0x1908(){const _0x427e6f=['AI_CHAT_CONTEXT_FILE_TOO_LARGE','getInteractionAndReplyById','_balloonShowDiff','like','filter','remove','uid','getTransformedByOperation','mouseOverSuggestion','setConversationContext','resource','updateResourceState','setIsMaximized','updateCurrentDocumentInContext','toViewRange','requires','insertSuggestion','toString','ai-chat-invalid-request','resizedTabs','getRanges','slice','activeConversation','showChangeInText','getOperations','sendUserMessage','_stopLastInteraction','contextItemRemoved','ai-chat-controller-mouse-over','ai-chat-controller-no-active-conversation','editors','_getDocumentRangeForReplyChanges','updateContent','setContextItemLoading','contextItem','getDocumentContext','getConversation','ai-chat-conversation-init-failed','uiId','interactionStarted','addFeedItemStaticMessage','modelSelected','mapper','sources','source','howMany','setFeedItemRenderingStrategy','TrackChangesEditing','has','rootName','addFeedItemUserMessage','chat','populateSourceResourceBalloon','isPremiumPlugin','1491992NmcCMA','isLoading','getRoot','setLoadingMessage','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','clearPendingContextUI','_integrateEditor','set','addOperation','_handleStartConversation','_batchToChanges','getInteraction','error','ai-chat-missing-channel-id','mouseLeaveSuggestion','fetchConversation','modification-delta','static','domConverter','delete','collaboration.channelId','showFakeVisualSelection','ai.chat.context','isInContext','viewRangeToDom','getChildren','range','_openBalloonFor','_removeAISelectionMarkers','toggleLoadingSkeleton','state','reasoningFinished','_setIsMaximized','_startConversationSafely','isDocumentOperation','interactionDestroyed','batch','hasChanges','setAddContextOptions','conversationInitialized','selectedModel','$graveyard','_toggleReasoning','full','indexOf','ai-chat-context-unsupported-file-type','replyChangeGroupStateUpdated','getContentParts','removed','changeGroups','get','_aiChatUi','model','changes','stopInteraction','getDocumentData','_aiConnector','_updateRatings','createConversation','path','isOpen','isCurrentDocumentInContext','addFeedItemAISuggestion','unshift','getChild','AI_BALLOON_HEADER_TITLE','selectModel','resources','nextSibling','activateTab','toggleReasoning','toggleWebSearch','lastInteraction','AI_CHAT_CONTEXT_INVALID_DATA','ai-chat-context-file-too-many-pages','map','7yNBZCT','applyOperation','uploadProgressChanged','message','messageId','startConversation','from','baseVersion','config','setModel','createRange','309830eZdOkj','interactionFinished','disableControls','setSelectedModel','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','listenTo','addFeedInteractionHeader','closeSourceResourceBalloon','_createFromRanges','index','ai-chat-context-unsupported-type','addDocumentToContext','stop','contextSent','applySuggestion','new','startAutoScroll','isOfficialPlugin','isStarted','end','234Bxmqrx','contextItems','sourceId','getMarkersGroup','pluginName','AITabs','sourcePosition','length','split','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','addSelectionToChatContext','query','abortPromptStream','AI_CHAT_GENERIC_ERROR','showNext','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','reasoningStarted','clearConversationContextUI','upsertAIChatRating','AI_CHAT_UNABLE_TO_START_CONVERSATION','_flushLastInteractionUI','_insertSuggestion','ai-chat-context-file-too-large','locale','AIConnector','replyCreated','_handleUIUserMessage','startsWith','add','toggleSuggestionDisplayMode','maxOffset','node','removeSelectionFromContext','selection','AIChatUI','getSelectionText','getPath','focusPromptInput','loadSourceResources','3624996EiGtmL','ai-chat-source-resources-load-failed','Liked\x20response','init','getDiff','ai-chat-context-form-data-size-limits-exceeded','AI_CHAT_ABORTED_MESSAGE','text-delta','removeContextItem','alignToTop','indexes','AIChatController','isUploadInProgress','marker','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','rejected','ai-chat-context-invalid-data','parse','updateFeedItemAIReplySuggestionContent','replyId','enableControls','setConversationTitle','_applyOperationsAsSuggestions','replies','ai-chat-file-upload-failed','updateFeedItemAIReplySuggestionPartState','resourceStateChanged','load','webSearchStarted','ai-chat-conversation-start-failed','undo','updateConversationTitle','close','ai-no-track-changes','getFirstRange','cloneNode','addUrlToContext','addSelectionToContext','webSearchFinished','stopListening','_toggleWebSearch','anchorId','createPositionFromPath','documentContextContent','Undo','open','resourceId','showDiff','data-id','_applySuggestion','updateCapabilities','showPrevious','resizeTabs','resetMessageInput','removeFromContext','handleUserInteraction','ai-conversation-','945750NfZYRm','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','addContextOptionsChanged','push','_aiChatModels','loadConversation','getGroupId','children','_removeFromContext','TrackChanges','resetConversationTitle','contextItemLoadingEnded','sendMessage','ai.availableReplyActions','createPositionAt','dialogClosed','startInteraction','find','commands','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','sourceResourcesLoaded','AI_CHAT_INVALID_REQUEST','afterInit','ai-chat-resource-load-failed','revert','_scrollToSuggestionRange','accepted','Disliked\x20response','ai-chat-conversation-not-found','content','getReply','log','handleRemovedConversation','contextItemAdded','capabilitiesUpdated','view','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','addFilesToContext','updateFeedItemAIReplyContent','findIndex','current-document','setIsUploadInProgress','streaming','getAttribute','removeSelectionFromChatContext','resize','ai.chat.models.displayedModels','history','updateFeedItemAIReplySources','385992pjeWEO','isModelAvailable','replyContentUpdated','interactionId','ready','ai.chat.models.defaultModelId','AI_CHAT_RESOURCE_LOAD_FAILED','addFeedItemAIReply','AI_CHAT_UNTITLED_CONVERSATION','finishInteraction','_showConversationHistory','redo','document','_aiEditing','removeFeedInteraction','interactionCreated','ai-chat-url-upload-failed','root','data','outdated','addResourceToContext','addFileToContext','change','_previewedChangeGroup','markers','type','Showing\x20conversation\x20history...','getChildAtOffset','ai-request-aborted','addCurrentDocumentToContext','scrollFeedToSuggestion','context','hideFakeVisualSelection','_updateReplyContent','removeMarker','version','addContextItem','DocumentCompare','_logError','plugins','main','rejectSuggestion','isCurrentDocumentInConversation','start','options','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','setChangeGroupState','pending','642672MPOqBH','addFeedItemError','editing','dislike','partIndex','10TEABbM','forEach','7643208qFuTRU','AIEditing','isDisabled'];_0x1908=function(){return _0x427e6f;};return _0x1908();}const _0x5f5dc3=_0x3a43;(function(_0x2c2bf1,_0x41fb56){const _0x2d229d=_0x3a43,_0x5a1e97=_0x2c2bf1();while(!![]){try{const _0x9c583=-parseInt(_0x2d229d(0x1b7))/0x1+-parseInt(_0x2d229d(0x1e8))/0x2+-parseInt(_0x2d229d(0x218))/0x3+parseInt(_0x2d229d(0x258))/0x4*(parseInt(_0x2d229d(0x21d))/0x5)+-parseInt(_0x2d229d(0x17e))/0x6+parseInt(_0x2d229d(0x138))/0x7*(parseInt(_0x2d229d(0x21f))/0x8)+-parseInt(_0x2d229d(0x157))/0x9*(-parseInt(_0x2d229d(0x143))/0xa);if(_0x9c583===_0x41fb56)break;else _0x5a1e97['push'](_0x5a1e97['shift']());}catch(_0x242c0f){_0x5a1e97['push'](_0x5a1e97['shift']());}}}(_0x1908,0x863bb));import{ContextPlugin as _0x1a3210,Editor as _0x23b274}from'ckeditor5/src/core.js';import{CKEditorError as _0x5cc404,logError as _0x2cf3bc,scrollViewportToShowTarget as _0x5dae96,uid as _0x1582f1}from'ckeditor5/src/utils.js';import{AIConnector as _0x4bdd2d}from'../aicore/aiconnector.js';function _0x3a43(_0x50c20a,_0x4a2ed0){const _0x1908cd=_0x1908();return _0x3a43=function(_0x3a43e3,_0x58b995){_0x3a43e3=_0x3a43e3-0x123;let _0x4624df=_0x1908cd[_0x3a43e3];return _0x4624df;},_0x3a43(_0x50c20a,_0x4a2ed0);}import{AITabs as _0x33adb1}from'../aitabs/aitabs.js';import{AIChatConversation as _0x47f28f}from'./model/aichatconversation.js';import{getTranslation as _0x28fa95}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0xedcbfe}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x555b82}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3a135d}from'./model/aichatmodels.js';import{getEditorFromContext as _0x518d08}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x11862a,DATA_ID_MODEL_ATTRIBUTE as _0x3d2679}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0xbff3df,getOperationsFromReply as _0x2a6de2}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x18a23d,getMinimalSelection as _0x349bed}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x33df60,_DetachOperation as _0x414068}from'ckeditor5/src/engine.js';import{findOne as _0x3aab3c,getAttribute as _0x1abf36,serialize as _0x3e6850,Document as _0x533c8a,findByAttribute as _0x3c99c5}from'../aicore/utils/htmlparser.js';import{IconAI as _0x97a899}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x307d7c}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x864511}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x1a3210{[_0x5f5dc3(0x1f5)];[_0x5f5dc3(0x124)];[_0x5f5dc3(0x28b)];[_0x5f5dc3(0x1bb)];[_0x5f5dc3(0x262)]=new Map();[_0x5f5dc3(0x1ff)]=null;[_0x5f5dc3(0x224)]=!0x1;static get[_0x5f5dc3(0x231)](){return[_0x4bdd2d,_0x864511,_0x11862a];}static get[_0x5f5dc3(0x15b)](){const _0xdadb60=_0x5f5dc3;return _0xdadb60(0x189);}static get[_0x5f5dc3(0x154)](){return!0x0;}static get[_0x5f5dc3(0x257)](){return!0x0;}[_0x5f5dc3(0x181)](){const _0xeccc70=_0x5f5dc3;this[_0xeccc70(0x124)]=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x16f)),this[_0xeccc70(0x28b)]=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x179)),this[_0xeccc70(0x1f5)]=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x220)),this[_0xeccc70(0x1bb)]=new _0x3a135d({'connector':this[_0xeccc70(0x124)],'availableModels':this[_0xeccc70(0x207)][_0xeccc70(0x140)][_0xeccc70(0x28a)](_0xeccc70(0x1e5)),'defaultModelId':this[_0xeccc70(0x207)][_0xeccc70(0x140)][_0xeccc70(0x28a)](_0xeccc70(0x1ed))});const _0x3cd514=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x15c));this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x13d),()=>{const _0x4f49b9=_0xeccc70;this[_0x4f49b9(0x279)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x23b),(_0x467adc,_0x18f9bc)=>{const _0x95bc83=_0xeccc70;this[_0x95bc83(0x171)]({'userMessage':_0x18f9bc});}),this[_0xeccc70(0x148)](_0x3cd514,_0xeccc70(0x235),(_0x2e1ec0,_0x55b743)=>{const _0x110a09=_0xeccc70;this[_0x110a09(0x278)](_0x55b743);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1b2),()=>{const _0x42f17e=_0xeccc70;_0x3cd514[_0x42f17e(0x1e4)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x163),async()=>{const _0xe88b60=_0xeccc70;await this[_0xe88b60(0x23c)](),await this[_0xe88b60(0x16b)](),this[_0xe88b60(0x1e3)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x14e),()=>{const _0x3dafff=_0xeccc70;this[_0x3dafff(0x238)]?.[_0x3dafff(0x205)](_0x28fa95(this[_0x3dafff(0x207)][_0x3dafff(0x16e)],_0x3dafff(0x18c)));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1fd),(_0x2be2d4,_0x4aab71)=>{const _0x5d7d1c=_0xeccc70;this[_0x5d7d1c(0x238)]?.[_0x5d7d1c(0x1dc)](Array[_0x5d7d1c(0x13e)](_0x4aab71));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1a2),(_0x1741a7,_0x5482e1)=>{const _0x11fbf3=_0xeccc70;this[_0x11fbf3(0x238)]?.[_0x11fbf3(0x1a2)](_0x5482e1);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1fc),(_0x27212c,_0x34428b)=>{const _0x2d565d=_0xeccc70;this[_0x2d565d(0x238)]?.[_0x2d565d(0x1fc)](_0x34428b[_0x2d565d(0x24e)],_0x34428b[_0x2d565d(0x22c)]);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x186),(_0x878422,_0x118515)=>{const _0x5c079c=_0xeccc70;this[_0x5c079c(0x1bf)](_0x118515);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x17d),(_0x33e7ef,_0x43e743)=>{const _0x244466=_0xeccc70;this[_0x244466(0x238)]?.[_0x244466(0x17d)](_0x43e743[_0x244466(0x159)],_0x43e743[_0x244466(0x162)],_0x43e743[_0x244466(0x228)]);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x133),()=>{const _0x4602f6=_0xeccc70;this[_0x4602f6(0x1a6)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x132),()=>{const _0x497d59=_0xeccc70;this[_0x497d59(0x282)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x12e),(_0x2a2106,_0x2dd130)=>{const _0x2ba8ec=_0xeccc70;this[_0x2ba8ec(0x238)]?.[_0x2ba8ec(0x141)](_0x2dd130);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x225),(_0x5e5384,{replyId:_0xfdee5f})=>{const _0x308384=_0xeccc70;console[_0x308384(0x1d6)](_0x308384(0x180),_0xfdee5f);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x21b),(_0xa5e570,{replyId:_0x17b647})=>{const _0x4dfaf5=_0xeccc70;console[_0x4dfaf5(0x1d6)](_0x4dfaf5(0x1d2),_0x17b647);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x232),(_0x31803f,_0x4d1d1a)=>{const _0x1093c4=_0xeccc70;this[_0x1093c4(0x207)][_0x1093c4(0x20f)][_0x1093c4(0x28a)](_0x864511)[_0x1093c4(0x19e)](),this[_0x1093c4(0x16c)](_0x4d1d1a);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x239),(_0x504f7c,{replyId:_0x2f6cfd,partIndex:_0x2dc5ae})=>{const _0x19597e=_0xeccc70;this[_0x19597e(0x224)]=this[_0x19597e(0x28b)][_0x19597e(0x1ad)],this[_0x19597e(0x273)](_0x2f6cfd,_0x2dc5ae);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x22a),(_0x57ba59,{replyId:_0x14b156,partIndex:_0x50a00f})=>{const _0x96f021=_0xeccc70,_0x449c8b=this[_0x96f021(0x241)](_0x14b156,_0x50a00f);_0x449c8b&&_0x96f021(0x281)!=_0x449c8b[_0x96f021(0x272)][_0x96f021(0x1f9)][_0x96f021(0x253)]&&this[_0x96f021(0x1f5)][_0x96f021(0x26d)]([_0x449c8b[_0x96f021(0x272)]],_0x96f021(0x23e));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x266),()=>{const _0x13bec6=_0xeccc70;this[_0x13bec6(0x1f5)][_0x13bec6(0x208)](_0x13bec6(0x23e));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x151),(_0x45b2e5,_0x3e8857)=>{const _0x57f43d=_0xeccc70;this[_0x57f43d(0x207)][_0x57f43d(0x20f)][_0x57f43d(0x28a)](_0x864511)[_0x57f43d(0x19e)](),this[_0x57f43d(0x1af)](_0x3e8857);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x174),async(_0x320b27,{replyId:_0x4a0638,showDiff:_0x72755c})=>{const _0x576b60=_0xeccc70,{reply:_0x2221d7}=this[_0x576b60(0x223)](_0x4a0638),_0xc9d9b4=_0x2221d7[_0x576b60(0x287)]({'showDiff':_0x72755c});await this[_0x576b60(0x28b)][_0x576b60(0x190)]({'id':_0x2221d7['id'],'parts':_0xc9d9b4,'renderingStrategy':_0x576b60(0x269)});}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x211),(_0x311f2f,{replyId:_0x30b04d,partIndex:_0x196ee8})=>{const _0x1deb5b=_0xeccc70;this[_0x1deb5b(0x1ff)]?.[_0x1deb5b(0x191)]==_0x30b04d&&this[_0x1deb5b(0x1ff)]?.[_0x1deb5b(0x21c)]==_0x196ee8&&this[_0x1deb5b(0x207)][_0x1deb5b(0x20f)][_0x1deb5b(0x28a)](_0x864511)[_0x1deb5b(0x19e)]();const {reply:_0x5900ee}=this[_0x1deb5b(0x223)](_0x30b04d);_0x5900ee[_0x1deb5b(0x216)](_0x196ee8,_0x1deb5b(0x18d)),this[_0x1deb5b(0x1f5)][_0x1deb5b(0x208)](_0x1deb5b(0x23e));});}async[_0x5f5dc3(0x1cd)](){const _0x1e2452=_0x5f5dc3;this[_0x1e2452(0x207)]instanceof _0x23b274?this[_0x1e2452(0x25e)](this[_0x1e2452(0x207)]):this[_0x1e2452(0x148)](this[_0x1e2452(0x207)][_0x1e2452(0x240)],_0x1e2452(0x173),(_0xbafef9,_0x3f8c51)=>{const _0x5b8096=_0x1e2452;_0x3f8c51['on'](_0x5b8096(0x1ec),()=>{const _0x4c2a48=_0x5b8096;this[_0x4c2a48(0x25e)](_0x3f8c51);});}),await this[_0x1e2452(0x279)]();}[_0x5f5dc3(0x16c)](_0x30a0eb){const _0x326426=_0x5f5dc3,_0xc7554c=_0x518d08(this[_0x326426(0x207)]);if(!_0xc7554c[_0x326426(0x20f)][_0x326426(0x252)](_0x326426(0x1c0)))throw new _0x5cc404(_0x326426(0x19f),null);const _0x2d21c6=this[_0x326426(0x207)][_0x326426(0x20f)][_0x326426(0x28a)](_0x326426(0x20d)),{reply:_0x37a585,interaction:_0x56fb7e}=this[_0x326426(0x223)](_0x30a0eb[_0x326426(0x191)]),_0x2875f1=this[_0x326426(0x241)](_0x30a0eb[_0x326426(0x191)],_0x30a0eb[_0x326426(0x21c)]),_0xc1787a=void 0x0!==_0x30a0eb[_0x326426(0x21c)]?[_0x37a585[_0x326426(0x289)][_0x30a0eb[_0x326426(0x21c)]]]:_0x37a585[_0x326426(0x289)][_0x326426(0x226)](_0x41f7c6=>_0x326426(0x217)==_0x41f7c6[_0x326426(0x276)]),_0x4b22b6=_0xc1787a[_0x326426(0x137)](_0xc42df3=>_0x37a585[_0x326426(0x289)][_0x326426(0x284)](_0xc42df3));if(!_0x2875f1||_0x326426(0x281)==_0x2875f1[_0x326426(0x272)][_0x326426(0x1f9)][_0x326426(0x253)])return void _0x4b22b6[_0x326426(0x21e)](_0x3bec23=>_0x37a585[_0x326426(0x216)](_0x3bec23,_0x326426(0x1fb)));_0x4b22b6[_0x326426(0x21e)](_0x296bd1=>_0x37a585[_0x326426(0x216)](_0x296bd1,_0x326426(0x1d1)));const _0x32f6b2=_0x2a6de2({'editor':_0xc7554c,'reply':_0x37a585,'interaction':_0x56fb7e,'groups':_0xc1787a,'transform':!0x0,'documentCompare':_0x2d21c6,'documentCompareOptions':{'anchor':_0x326426(0x210),'markDeletions':!0x0}});let _0x5e9924;_0x2875f1&&this[_0x326426(0x1d0)](_0x2875f1[_0x326426(0x272)]),_0xc7554c[_0x326426(0x28c)][_0x326426(0x1fe)](_0x4acf07=>{const _0xd9c60=_0x326426;_0x5e9924=_0x4acf07[_0xd9c60(0x27c)],_0xc7554c[_0xd9c60(0x20f)][_0xd9c60(0x28a)](_0xd9c60(0x251))[_0xd9c60(0x194)](_0x32f6b2),this[_0xd9c60(0x1f5)][_0xd9c60(0x208)](_0xd9c60(0x23e));}),this[_0x326426(0x262)][_0x326426(0x25f)](_0x5e9924,{'interactionId':_0x56fb7e['id'],'replyId':_0x37a585['id'],'indexes':_0x4b22b6[_0x326426(0x237)]()}),this[_0x326426(0x125)](_0x37a585);}[_0x5f5dc3(0x1af)](_0x23029a){const _0x9f4120=_0x5f5dc3,_0x201bfd=_0x518d08(this[_0x9f4120(0x207)]),_0x3e750f=this[_0x9f4120(0x207)][_0x9f4120(0x20f)][_0x9f4120(0x28a)](_0x11862a),{reply:_0x5f5e8d,interaction:_0x4e0577}=this[_0x9f4120(0x223)](_0x23029a[_0x9f4120(0x191)]),_0x2b260d=this[_0x9f4120(0x241)](_0x23029a[_0x9f4120(0x191)],_0x23029a[_0x9f4120(0x21c)]),_0x229225=void 0x0!==_0x23029a[_0x9f4120(0x21c)]?[_0x5f5e8d[_0x9f4120(0x289)][_0x23029a[_0x9f4120(0x21c)]]]:_0x5f5e8d[_0x9f4120(0x289)][_0x9f4120(0x226)](_0x5e90bf=>_0x9f4120(0x217)==_0x5e90bf[_0x9f4120(0x276)]),_0x32d5a5=_0x229225[_0x9f4120(0x137)](_0x15b419=>_0x5f5e8d[_0x9f4120(0x289)][_0x9f4120(0x284)](_0x15b419));if(!_0x2b260d||_0x9f4120(0x281)==_0x2b260d[_0x9f4120(0x272)][_0x9f4120(0x1f9)][_0x9f4120(0x253)])return void _0x32d5a5[_0x9f4120(0x21e)](_0x1a330d=>_0x5f5e8d[_0x9f4120(0x216)](_0x1a330d,_0x9f4120(0x1fb)));_0x32d5a5[_0x9f4120(0x21e)](_0x4d434c=>_0x5f5e8d[_0x9f4120(0x216)](_0x4d434c,_0x9f4120(0x1d1)));const _0x40a36f=_0x2a6de2({'editor':_0x201bfd,'reply':_0x5f5e8d,'interaction':_0x4e0577,'groups':_0x229225,'transform':!0x0,'documentCompare':_0x3e750f,'documentCompareOptions':{'anchor':_0x9f4120(0x210),'markDeletions':!0x1}});let _0xf1e8b3;_0x2b260d&&this[_0x9f4120(0x1d0)](_0x2b260d[_0x9f4120(0x272)]),_0x201bfd[_0x9f4120(0x28c)][_0x9f4120(0x1fe)](_0xbf8d08=>{const _0x1ed228=_0x9f4120;_0xf1e8b3=_0xbf8d08[_0x1ed228(0x27c)];for(const _0xcf412a of _0x40a36f)_0xcf412a[_0x1ed228(0x13f)]=_0x201bfd[_0x1ed228(0x28c)][_0x1ed228(0x1f4)][_0x1ed228(0x20b)],_0xbff3df(_0x201bfd,_0xcf412a),_0xbf8d08[_0x1ed228(0x27c)][_0x1ed228(0x260)](_0xcf412a),_0x201bfd[_0x1ed228(0x28c)][_0x1ed228(0x139)](_0xcf412a);}),this[_0x9f4120(0x262)][_0x9f4120(0x25f)](_0xf1e8b3,{'interactionId':_0x4e0577['id'],'replyId':_0x5f5e8d['id'],'indexes':_0x32d5a5[_0x9f4120(0x237)]()}),this[_0x9f4120(0x125)](_0x5f5e8d);}[_0x5f5dc3(0x273)](_0x35c524,_0x1e9c8a){const _0x35f1d3=_0x5f5dc3,_0x1dd813=_0x518d08(this[_0x35f1d3(0x207)]),_0x1d2fbc=this[_0x35f1d3(0x241)](_0x35c524,_0x1e9c8a),_0x506934=this[_0x35f1d3(0x207)][_0x35f1d3(0x20f)][_0x35f1d3(0x28a)](_0x864511);if(!_0x1d2fbc)return void _0x506934[_0x35f1d3(0x19e)]();const {range:_0x464a71,currentIndex:_0x22206e}=_0x1d2fbc;if(_0x35f1d3(0x281)==_0x464a71[_0x35f1d3(0x1f9)][_0x35f1d3(0x253)]){const {reply:_0x2623ca}=this[_0x35f1d3(0x223)](_0x35c524);return _0x2623ca[_0x35f1d3(0x216)](_0x22206e,_0x35f1d3(0x1fb)),void _0x506934[_0x35f1d3(0x19e)]();}if(this[_0x35f1d3(0x1ff)]?.[_0x35f1d3(0x191)]==_0x35c524&&this[_0x35f1d3(0x1ff)]?.[_0x35f1d3(0x21c)]==_0x22206e)return;this[_0x35f1d3(0x1a5)](_0x506934),this[_0x35f1d3(0x1ff)]={'replyId':_0x35c524,'partIndex':_0x22206e};let _0x342c2f=_0x1dd813[_0x35f1d3(0x140)][_0x35f1d3(0x28a)](_0x35f1d3(0x1c4))||[..._0x555b82];_0x1dd813[_0x35f1d3(0x20f)][_0x35f1d3(0x252)](_0x35f1d3(0x1c0))||(_0x342c2f=_0x342c2f[_0x35f1d3(0x226)](_0x342440=>_0x35f1d3(0x232)!=_0x342440));const _0x54c5c1=new _0x307d7c(_0x1dd813[_0x35f1d3(0x16e)],{'showDiff':this[_0x35f1d3(0x224)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x35f1d3(0x283)},'hideHeader':!0x0,'availableActions':_0x342c2f});this[_0x35f1d3(0x1a5)](_0x54c5c1);const {reply:_0x2e77c0}=this[_0x35f1d3(0x223)](_0x35c524),_0x3d4eda=_0x2e77c0[_0x35f1d3(0x287)]({'showDiff':this[_0x35f1d3(0x224)]})[_0x35f1d3(0x226)](_0x5040ec=>_0x5040ec[_0x35f1d3(0x27d)]),_0xde1add=_0x3d4eda[_0x35f1d3(0x1de)](_0x50ed56=>_0x50ed56[_0x35f1d3(0x14c)]==_0x22206e);if(-0x1==_0xde1add)return;const _0x685e72=_0x3d4eda[_0xde1add],_0x2b4d4a=_0x3d4eda['at']((_0xde1add-0x1)%_0x3d4eda[_0x35f1d3(0x15e)])?.[_0x35f1d3(0x14c)],_0x1f4ee9=_0x3d4eda['at']((_0xde1add+0x1)%_0x3d4eda[_0x35f1d3(0x15e)])?.[_0x35f1d3(0x14c)];_0x54c5c1[_0x35f1d3(0x242)]({'parts':[_0x685e72],'renderingStrategy':_0x35f1d3(0x269)});const _0x455e52=_0x22206e!==_0x2b4d4a;this[_0x35f1d3(0x1d0)](_0x464a71,!0x0),_0x506934[_0x35f1d3(0x1ab)]({'index':_0x22206e,'title':_0x28fa95(this[_0x35f1d3(0x207)][_0x35f1d3(0x16e)],_0x35f1d3(0x12d),(_0xde1add+0x1)[_0x35f1d3(0x233)]()),'icon':_0x97a899,'mainView':_0x54c5c1,'showRotator':_0x455e52,'showApplyButton':!0x0,'showSuggestButton':_0x1dd813[_0x35f1d3(0x20f)][_0x35f1d3(0x252)](_0x35f1d3(0x1c0)),'ranges':[_0x464a71]}),this[_0x35f1d3(0x28b)][_0x35f1d3(0x206)](_0x35c524,_0x22206e),this[_0x35f1d3(0x148)](_0x54c5c1,_0x35f1d3(0x174),(_0x4c69a2,{showDiff:_0x27da96})=>{const _0x7ed794=_0x35f1d3;this[_0x7ed794(0x224)]=_0x27da96;const {reply:_0x4332b4}=this[_0x7ed794(0x223)](_0x35c524),_0x5ad99c=_0x4332b4[_0x7ed794(0x287)]({'showDiff':_0x27da96,'groupIndex':_0x22206e});_0x54c5c1[_0x7ed794(0x242)]({'parts':_0x5ad99c,'renderingStrategy':_0x7ed794(0x269)});}),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x151),()=>{const _0x1138d8=_0x35f1d3;this[_0x1138d8(0x1af)]({'replyId':_0x35c524,'partIndex':_0x22206e}),_0x455e52?this[_0x1138d8(0x273)](_0x35c524,_0x1f4ee9):_0x506934[_0x1138d8(0x19e)]();}),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x232),()=>{const _0xed8ae3=_0x35f1d3;this[_0xed8ae3(0x16c)]({'replyId':_0x35c524,'partIndex':_0x22206e}),_0x455e52?this[_0xed8ae3(0x273)](_0x35c524,_0x1f4ee9):_0x506934[_0xed8ae3(0x19e)]();}),_0x455e52&&(this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x165),()=>{const _0x374cd2=_0x35f1d3;this[_0x374cd2(0x273)](_0x35c524,_0x1f4ee9);}),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x1b1),()=>{const _0x33c673=_0x35f1d3;this[_0x33c673(0x273)](_0x35c524,_0x2b4d4a);})),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x1c6),()=>{const _0x3a9da3=_0x35f1d3;this[_0x3a9da3(0x1a5)](_0x506934),this[_0x3a9da3(0x1a5)](_0x54c5c1),this[_0x3a9da3(0x1ff)]=null;});}[_0x5f5dc3(0x241)](_0x5479f1,_0xed0c20){const _0x5927d4=_0x5f5dc3,_0x156008=_0x518d08(this[_0x5927d4(0x207)]),{reply:_0x4109b4,interaction:_0x4e914a}=this[_0x5927d4(0x223)](_0x5479f1),_0x57a8a5=_0x4109b4[_0x5927d4(0x289)][_0x5927d4(0x226)](_0x4d3ff9=>_0x5927d4(0x217)==_0x4d3ff9[_0x5927d4(0x276)]),_0x311890=_0x57a8a5[_0x5927d4(0x137)](_0x63d5dc=>_0x4109b4[_0x5927d4(0x289)][_0x5927d4(0x284)](_0x63d5dc));void 0x0===_0xed0c20&&(_0xed0c20=_0x311890[0x0]);const _0x18423c=_0x311890[_0x5927d4(0x284)](_0xed0c20);if(-0x1==_0x18423c)return null;const _0x9250fb=_0x57a8a5[_0x18423c],_0x655395=new _0x533c8a([]),_0x3d19f5=new _0x533c8a([]);for(const _0x107863 of _0x9250fb[_0x5927d4(0x28d)])if(_0x5927d4(0x288)!=_0x107863[_0x5927d4(0x201)]&&_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x107863[_0x5927d4(0x176)][_0x5927d4(0x1a1)](!0x0)),_0x5927d4(0x152)!=_0x107863[_0x5927d4(0x201)]){const _0x2ed3f0=_0x3aab3c(_0x446206=>_0x1abf36(_0x446206,_0x5927d4(0x1ae))==_0x107863['id'],_0x4109b4[_0x5927d4(0x1a9)],!0x0);_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x2ed3f0[_0x5927d4(0x1a1)](!0x0));}if(0x0==_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x15e)]){if(_0x9250fb[_0x5927d4(0x28d)][0x0][_0x5927d4(0x1a7)]){const _0x2b75d9=_0x3c99c5(_0x5927d4(0x1ae),_0x9250fb[_0x5927d4(0x28d)][0x0][_0x5927d4(0x1a7)],_0x4109b4[_0x5927d4(0x1a9)]);_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x12b)](_0x2b75d9[_0x5927d4(0x1a1)](!0x0)),_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x12b)](_0x2b75d9[_0x5927d4(0x1a1)](!0x0)),_0x2b75d9[_0x5927d4(0x130)]&&(_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x2b75d9[_0x5927d4(0x130)][_0x5927d4(0x1a1)](!0x0)),_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x2b75d9[_0x5927d4(0x130)][_0x5927d4(0x1a1)](!0x0)));}else{const _0x22bf8f=_0x4109b4[_0x5927d4(0x1a9)][_0x5927d4(0x1be)][0x0];if(!_0x22bf8f)return null;_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x22bf8f[_0x5927d4(0x1a1)](!0x0)),_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x22bf8f[_0x5927d4(0x1a1)](!0x0));}}const _0x2c4a7c=_0x4e914a[_0x5927d4(0x245)](),_0x58d48b=_0x156008[_0x5927d4(0x1fa)][_0x5927d4(0x18f)](_0x2c4a7c[_0x5927d4(0x1d4)]),_0x1f725d=_0x3e6850(_0x655395),_0x2aa9e1=_0x156008[_0x5927d4(0x1fa)][_0x5927d4(0x18f)](_0x1f725d),_0x22a2cb=_0x156008[_0x5927d4(0x1fa)][_0x5927d4(0x18f)](_0x1f725d),_0xbc0f6=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1c5)](_0x2aa9e1,0x0),_0x39be8a=_0x3e6850(_0x3d19f5),_0x5985f0={'anchor':_0xbc0f6,'markDeletions':!0x1},_0x1260ce=_0x156008[_0x5927d4(0x20f)][_0x5927d4(0x28a)](_0x11862a)[_0x5927d4(0x182)](_0x1f725d,_0x39be8a,_0x5985f0)[_0x5927d4(0x23a)]();if(!_0x1260ce[_0x5927d4(0x15e)])return null;_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1fe)](_0x35470e=>{const _0x2a1adc=_0x5927d4;for(const _0x13b649 of _0x1260ce)if(_0x2a1adc(0x227)==_0x13b649[_0x2a1adc(0x201)]){const _0x4b582d=_0x13b649[_0x2a1adc(0x15d)],_0x50722a=_0x13b649[_0x2a1adc(0x24f)],_0x4130e9=new _0x414068(_0x4b582d,_0x50722a);_0x35470e[_0x2a1adc(0x27c)][_0x2a1adc(0x260)](_0x4130e9),_0x156008[_0x2a1adc(0x28c)][_0x2a1adc(0x139)](_0x4130e9);}else _0x2a1adc(0x18b)!==_0x13b649[_0x2a1adc(0x201)]&&(_0x13b649[_0x2a1adc(0x13f)]=null,_0x13b649[_0x2a1adc(0x27a)]=!0x1,_0x35470e[_0x2a1adc(0x27c)][_0x2a1adc(0x260)](_0x13b649),_0x156008[_0x2a1adc(0x28c)][_0x2a1adc(0x139)](_0x13b649));});const _0x1888b8=_0x349bed(_0x156008,_0x1260ce,_0x2aa9e1);_0x18a23d(_0x156008[_0x5927d4(0x28c)],_0x1888b8);const _0x19586d=_0x1888b8[_0x5927d4(0x1a0)]()[_0x5927d4(0x213)][_0x5927d4(0x127)][_0x5927d4(0x237)](),_0xe4fbf5=_0x1888b8[_0x5927d4(0x1a0)]()[_0x5927d4(0x156)][_0x5927d4(0x127)][_0x5927d4(0x237)](),_0x5eebba=[];let _0x1b5a1c=_0x2aa9e1,_0x40cc12=_0x22a2cb;for(let _0x1215a0=0x0;_0x1215a0<_0xe4fbf5[_0x5927d4(0x15e)];_0x1215a0++){const _0x34c875=_0x1b5a1c[_0x5927d4(0x175)]-_0xe4fbf5[_0x1215a0];_0x5eebba[_0x1215a0]=_0x40cc12[_0x5927d4(0x175)]-_0x34c875,_0x1b5a1c=_0x1b5a1c[_0x5927d4(0x203)](_0xe4fbf5[_0x1215a0]),_0x40cc12=_0x40cc12[_0x5927d4(0x203)](_0x5eebba[_0x1215a0]);}const _0x5c0639=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x142)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x22a2cb,_0x19586d),_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x22a2cb,_0x5eebba)),_0x3cc179=_0x22a2cb[_0x5927d4(0x12c)](0x0)[_0x5927d4(0x1e2)](_0x3d2679),_0x433edc=Array[_0x5927d4(0x13e)](_0x58d48b[_0x5927d4(0x271)]())[_0x5927d4(0x1c8)](_0x275fbf=>_0x275fbf[_0x5927d4(0x1e2)](_0x3d2679)==_0x3cc179)[_0x5927d4(0x17b)](),_0x4c78c5=_0x5c0639[_0x5927d4(0x213)][_0x5927d4(0x127)][_0x5927d4(0x237)](),_0x3feb0c=_0x5c0639[_0x5927d4(0x156)][_0x5927d4(0x127)][_0x5927d4(0x237)]();_0x4c78c5[0x0]=_0x433edc[0x0]+_0x4c78c5[0x0],_0x3feb0c[0x0]=_0x433edc[0x0]+_0x3feb0c[0x0];let _0x560b16=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x142)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1f4)][_0x5927d4(0x25a)](),_0x4c78c5),_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1f4)][_0x5927d4(0x25a)](),_0x3feb0c));const _0x2c4899=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1f4)][_0x5927d4(0x1e6)][_0x5927d4(0x23a)](_0x2c4a7c[_0x5927d4(0x20b)]);for(const _0x11a38f of _0x2c4899)_0x560b16=_0x33df60[_0x5927d4(0x14b)](_0x560b16[_0x5927d4(0x229)](_0x11a38f));return{'range':_0x560b16,'currentIndex':_0xed0c20};}[_0x5f5dc3(0x25e)](_0x88a4cc){const _0x49222d=_0x5f5dc3;if(!_0x88a4cc[_0x49222d(0x20f)][_0x49222d(0x252)](_0x49222d(0x1aa)))return;const _0x4064e5=_0x88a4cc[_0x49222d(0x1c9)][_0x49222d(0x28a)](_0x49222d(0x19c)),_0x4ea497=_0x88a4cc[_0x49222d(0x1c9)][_0x49222d(0x28a)](_0x49222d(0x1f3));this[_0x49222d(0x148)](_0x4064e5,_0x49222d(0x1cf),(_0x502a61,_0x195732,_0x19cc31)=>{const _0x343d8c=_0x49222d,_0xb6e53d=this[_0x343d8c(0x262)][_0x343d8c(0x28a)](_0x195732);if(!_0xb6e53d)return;const _0x470ce5=this[_0x343d8c(0x238)][_0x343d8c(0x263)](_0xb6e53d[_0x343d8c(0x1eb)])[_0x343d8c(0x1d5)](_0xb6e53d[_0x343d8c(0x191)]);_0xb6e53d[_0x343d8c(0x188)][_0x343d8c(0x21e)](_0x5c5a7e=>_0x470ce5[_0x343d8c(0x216)](_0x5c5a7e,_0x343d8c(0x217))),this[_0x343d8c(0x262)][_0x343d8c(0x26b)](_0x195732),this[_0x343d8c(0x262)][_0x343d8c(0x25f)](_0x19cc31,_0xb6e53d);}),this[_0x49222d(0x148)](_0x4ea497,_0x49222d(0x1cf),(_0x31e405,_0x4abfd5,_0x2e396b)=>{const _0x407d1c=_0x49222d,_0x4b21bc=this[_0x407d1c(0x262)][_0x407d1c(0x28a)](_0x4abfd5);if(!_0x4b21bc)return;const _0x5c0437=this[_0x407d1c(0x238)][_0x407d1c(0x263)](_0x4b21bc[_0x407d1c(0x1eb)])[_0x407d1c(0x1d5)](_0x4b21bc[_0x407d1c(0x191)]);_0x4b21bc[_0x407d1c(0x188)][_0x407d1c(0x21e)](_0xdb6df1=>_0x5c0437[_0x407d1c(0x216)](_0xdb6df1,_0x407d1c(0x1d1))),this[_0x407d1c(0x262)][_0x407d1c(0x26b)](_0x4abfd5),this[_0x407d1c(0x262)][_0x407d1c(0x25f)](_0x2e396b,_0x4b21bc);});}async[_0x5f5dc3(0x1bc)](_0x42ea83){const _0x4b1144=_0x5f5dc3;this[_0x4b1144(0x207)][_0x4b1144(0x20f)][_0x4b1144(0x28a)](_0x864511)[_0x4b1144(0x19e)](),this[_0x4b1144(0x28b)][_0x4b1144(0x250)](_0x4b1144(0x269)),this[_0x4b1144(0x28b)][_0x4b1144(0x275)](!0x0),await this[_0x4b1144(0x23c)]();try{await this[_0x4b1144(0x124)][_0x4b1144(0x267)](_0x42ea83)[_0x4b1144(0x246)](),await this[_0x4b1144(0x279)](_0x42ea83),this[_0x4b1144(0x19d)]('\x20');const {sessionId:_0x4a097b}=this[_0x4b1144(0x1f5)][_0x4b1144(0x123)]();await this[_0x4b1144(0x238)][_0x4b1144(0x199)](_0x42ea83,_0x4a097b),this[_0x4b1144(0x238)][_0x4b1144(0x212)]()&&this[_0x4b1144(0x238)][_0x4b1144(0x205)](_0x28fa95(this[_0x4b1144(0x207)][_0x4b1144(0x16e)],_0x4b1144(0x18c)));}catch(_0x36839c){this[_0x4b1144(0x28b)][_0x4b1144(0x219)]({'errorMessage':_0x28fa95(this[_0x4b1144(0x207)][_0x4b1144(0x16e)],_0x4b1144(0x215)),'id':_0x42ea83}),this[_0x4b1144(0x20e)](new _0x5cc404(_0x4b1144(0x1d3),this,{'error':_0x36839c}));}finally{this[_0x4b1144(0x207)][_0x4b1144(0x20f)][_0x4b1144(0x28a)](_0x33adb1)[_0x4b1144(0x1da)][_0x4b1144(0x131)](_0x4b1144(0x255)),this[_0x4b1144(0x28b)][_0x4b1144(0x153)](),this[_0x4b1144(0x28b)][_0x4b1144(0x250)](_0x4b1144(0x1e1)),this[_0x4b1144(0x28b)][_0x4b1144(0x275)](!0x1);}}[_0x5f5dc3(0x1d7)](_0x10db5a){const _0x5d0d8a=_0x5f5dc3;this[_0x5d0d8a(0x238)]['id']===_0x10db5a&&this[_0x5d0d8a(0x279)]();}async[_0x5f5dc3(0x161)](){const _0x48162a=_0x5f5dc3,_0x2a34e9=this[_0x48162a(0x1f5)][_0x48162a(0x17a)]();this[_0x48162a(0x238)]?.[_0x48162a(0x1a3)](_0x2a34e9),this[_0x48162a(0x238)]?.[_0x48162a(0x205)](_0x28fa95(this[_0x48162a(0x207)][_0x48162a(0x16e)],_0x48162a(0x18c)));}[_0x5f5dc3(0x1e3)](){const _0x28f2b1=_0x5f5dc3;this[_0x28f2b1(0x238)]?.[_0x28f2b1(0x177)]();}[_0x5f5dc3(0x17c)](){const _0x2340df=_0x5f5dc3;this[_0x2340df(0x28b)][_0x2340df(0x17c)]();}async[_0x5f5dc3(0x13d)](){const _0x51f97d=_0x5f5dc3;await this[_0x51f97d(0x279)]();}async[_0x5f5dc3(0x1c3)]({message:_0x19017a,quickActionData:_0x4dd3e6}){const _0x4a6644=_0x5f5dc3;await this[_0x4a6644(0x171)]({'userMessage':_0x19017a,'quickActionData':_0x4dd3e6});}[_0x5f5dc3(0x1bd)](){const _0x58ecea=_0x5f5dc3,_0x39f6c9=this[_0x58ecea(0x207)][_0x58ecea(0x140)][_0x58ecea(0x28a)](_0x58ecea(0x26c));if(!_0x39f6c9)throw new _0x5cc404(_0x58ecea(0x265),this);return _0x39f6c9;}async[_0x5f5dc3(0x279)](_0x515afb){const _0x25f59d=_0x5f5dc3;try{this[_0x25f59d(0x28b)][_0x25f59d(0x192)](),await this[_0x25f59d(0x261)](_0x515afb);}catch(_0x13e8e6){this[_0x25f59d(0x28b)][_0x25f59d(0x219)]({'errorMessage':_0x28fa95(this[_0x25f59d(0x207)][_0x25f59d(0x16e)],_0x25f59d(0x16a)),'id':_0x515afb||_0x1582f1()}),console[_0x25f59d(0x264)](_0x13e8e6),this[_0x25f59d(0x238)]=void 0x0,this[_0x25f59d(0x28b)][_0x25f59d(0x145)]();}}async[_0x5f5dc3(0x261)](_0x1a9fda){const _0x56e441=_0x5f5dc3,_0x1dca9a=this[_0x56e441(0x207)][_0x56e441(0x20f)][_0x56e441(0x28a)](_0x864511);let _0x1e3e71;_0x1dca9a[_0x56e441(0x128)]&&_0x1dca9a[_0x56e441(0x19e)](),_0x1a9fda||!this[_0x56e441(0x238)]?_0x1e3e71=this[_0x56e441(0x207)][_0x56e441(0x140)][_0x56e441(0x28a)](_0x56e441(0x1ed)):this[_0x56e441(0x28b)][_0x56e441(0x1e9)]&&(_0x1e3e71=this[_0x56e441(0x238)][_0x56e441(0x280)]['id']),await this[_0x56e441(0x23c)]();const _0x57ead3=this[_0x56e441(0x1bd)](),_0x269667=_0x1a9fda||_0x1582f1();this[_0x56e441(0x238)]=new _0x47f28f({'connector':this[_0x56e441(0x124)],'chatModels':this[_0x56e441(0x1bb)],'selectedModelId':_0x1e3e71,'conversationId':_0x269667,'group':_0x57ead3,'getEditor':()=>_0x518d08(this[_0x56e441(0x207)])}),this[_0x56e441(0x238)]['on'](_0x56e441(0x27f),(_0x2664eb,_0x1b37e5)=>{const _0x28cefc=_0x56e441;this[_0x28cefc(0x28b)][_0x28cefc(0x126)](_0x1b37e5),this[_0x28cefc(0x28b)][_0x28cefc(0x1b3)](),this[_0x28cefc(0x28b)][_0x28cefc(0x25d)](),this[_0x28cefc(0x28b)][_0x28cefc(0x168)](),_0x1a9fda||(this[_0x28cefc(0x28b)][_0x28cefc(0x1c1)](),this[_0x28cefc(0x238)]?.[_0x28cefc(0x205)](_0x28fa95(this[_0x28cefc(0x207)][_0x28cefc(0x16e)],_0x28cefc(0x18c))));}),this[_0x56e441(0x238)]['on'](_0x56e441(0x13a),(_0x3b0255,_0x34790b)=>{const _0x38d76d=_0x56e441;this[_0x38d76d(0x28b)][_0x38d76d(0x1e0)](_0x34790b[_0x38d76d(0x18a)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1f7),(_0x37bf91,_0x8e7ceb)=>{const _0x448f7d=_0x56e441;this[_0x448f7d(0x28b)][_0x448f7d(0x254)](_0x8e7ceb);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x19a),()=>{const _0x557aa0=_0x56e441;this[_0x557aa0(0x28b)][_0x557aa0(0x25b)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x167),()=>{const _0x5b0764=_0x56e441;this[_0x5b0764(0x28b)][_0x5b0764(0x25b)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1a4),(_0x239ed2,_0x4a7850)=>{const _0x901069=_0x56e441;this[_0x901069(0x28b)][_0x901069(0x149)](_0x4a7850,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x277),(_0x22701a,_0x4c3add)=>{const _0x3f4f08=_0x56e441;this[_0x3f4f08(0x28b)][_0x3f4f08(0x149)](_0x4c3add,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x249),()=>{const _0x4e2d61=_0x56e441;this[_0x4e2d61(0x28b)][_0x4e2d61(0x1c7)]();}),this[_0x56e441(0x238)]['on'](_0x56e441(0x144),async()=>{const _0x538ef4=_0x56e441;await this[_0x538ef4(0x28b)][_0x538ef4(0x1f1)]();}),this[_0x56e441(0x238)]['on'](_0x56e441(0x27b),(_0x538f7c,_0x25116f)=>{const _0x277258=_0x56e441;this[_0x277258(0x28b)][_0x277258(0x1f6)](_0x25116f['id']);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x193),(_0x2b9c3b,_0x37fc97,_0x4e0f85)=>{const _0x3c64d5=_0x56e441;this[_0x3c64d5(0x19d)](_0x37fc97,_0x4e0f85);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x170),(_0x2e2975,_0x853569)=>{const _0x31266a=_0x56e441;_0x31266a(0x185)===_0x853569[_0x31266a(0x201)]?this[_0x31266a(0x28b)][_0x31266a(0x1ef)](_0x853569):this[_0x31266a(0x28b)][_0x31266a(0x12a)](_0x853569);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1ea),async(_0x477adf,_0x583571)=>{const _0x4d0c02=_0x56e441;await this[_0x4d0c02(0x209)]({'reply':_0x583571});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x286),(_0x1939ee,{reply:_0x27acf6,index:_0x4f5803,state:_0x1913e2})=>{const _0x52980e=_0x56e441;this[_0x52980e(0x28b)][_0x52980e(0x197)]({'id':_0x27acf6['id'],'index':_0x4f5803,'state':_0x1913e2});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1d8),(_0x3a269f,_0x4d5295)=>{const _0x3c0b68=_0x56e441;if(this[_0x3c0b68(0x28b)][_0x3c0b68(0x20c)](_0x4d5295[_0x3c0b68(0x244)],_0x4d5295[_0x3c0b68(0x259)]),_0x3c0b68(0x178)===_0x4d5295[_0x3c0b68(0x244)][_0x3c0b68(0x201)]){const _0x4af833=[..._0x518d08(this[_0x3c0b68(0x207)])[_0x3c0b68(0x28c)][_0x3c0b68(0x1f4)][_0x3c0b68(0x178)][_0x3c0b68(0x236)]()];this[_0x3c0b68(0x1f5)][_0x3c0b68(0x26d)](_0x4af833,_0x3c0b68(0x1b6)+this[_0x3c0b68(0x238)]?.['id']);}}),this[_0x56e441(0x238)]['on'](_0x56e441(0x23d),(_0x8e20e0,_0x288892)=>{const _0x2c85a7=_0x56e441;this[_0x2c85a7(0x28b)][_0x2c85a7(0x186)](_0x288892[_0x2c85a7(0x248)]),_0x2c85a7(0x1df)==_0x288892[_0x2c85a7(0x248)]&&this[_0x2c85a7(0x1e3)](),_0x2c85a7(0x178)===_0x288892[_0x2c85a7(0x201)]&&this[_0x2c85a7(0x1f5)][_0x2c85a7(0x208)](_0x2c85a7(0x1b6)+this[_0x2c85a7(0x238)]?.['id']);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1c2),(_0x24e15d,_0x2ed11b)=>{const _0x1b097f=_0x56e441;this[_0x1b097f(0x28b)][_0x1b097f(0x243)](_0x2ed11b[_0x1b097f(0x244)][_0x1b097f(0x248)],_0x2ed11b[_0x1b097f(0x259)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x150),(_0x35963e,_0x439e91)=>{const _0x106a4e=_0x56e441;this[_0x106a4e(0x28b)][_0x106a4e(0x22b)](_0x439e91[_0x106a4e(0x158)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1b9),(_0x2879ba,_0x11ab69)=>{const _0x1b7c7b=_0x56e441;this[_0x1b7c7b(0x28b)][_0x1b7c7b(0x27e)](_0x11ab69[_0x1b7c7b(0x214)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1cb),(_0x1485e6,_0x17d2c2)=>{const _0x2f1f1a=_0x56e441;this[_0x2f1f1a(0x28b)][_0x2f1f1a(0x256)](_0x17d2c2[_0x2f1f1a(0x159)],_0x17d2c2[_0x2f1f1a(0x24e)],_0x17d2c2[_0x2f1f1a(0x12f)],_0x17d2c2[_0x2f1f1a(0x228)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x198),(_0x408234,_0x459d0a)=>{const _0x2a1f33=_0x56e441;this[_0x2a1f33(0x28b)][_0x2a1f33(0x22d)](_0x459d0a[_0x2a1f33(0x159)],_0x459d0a[_0x2a1f33(0x1ac)],_0x459d0a[_0x2a1f33(0x26f)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1d9),(_0x421cf0,_0x58b59c)=>{const _0x30bfa6=_0x56e441;this[_0x30bfa6(0x28b)][_0x30bfa6(0x1b0)](_0x58b59c);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x24b),(_0x373162,_0x1919c1)=>{const _0x1ac0af=_0x56e441;this[_0x1ac0af(0x28b)][_0x1ac0af(0x146)](_0x1919c1[_0x1ac0af(0x280)],_0x1919c1[_0x1ac0af(0x221)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x264),(_0x3df867,{error:_0x786ff4,interactionId:_0x514022,fileName:_0x54a74a,url:_0x3fc5f0,sourceId:_0xdd3d97,sourceLabel:_0x8cfd4d})=>{const _0x5b0181=_0x56e441,_0x4141a0=_0x514022?_0x514022+':'+_0x1582f1():_0x1582f1();_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x204))?this[_0x5b0181(0x28b)][_0x5b0181(0x24a)]({'staticMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x184)),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x247))||_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x19b))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x16a)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x196))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x147),_0x54a74a),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x1f8))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x160),_0x3fc5f0),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x18e))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x135)),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x14d))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1b8)),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x17f))?(_0xdd3d97&&this[_0x5b0181(0x28b)][_0x5b0181(0x14a)](_0xdd3d97),this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1ca),_0x8cfd4d||_0x5b0181(0x24e)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x1ce))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1ee)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x234))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1cc)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x285))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x166)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x16d))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x222)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x136))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x25c)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x183))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1db)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x164)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4));}),await this[_0x56e441(0x238)][_0x56e441(0x181)](this[_0x56e441(0x207)][_0x56e441(0x140)][_0x56e441(0x28a)](_0x56e441(0x26e))),_0x1a9fda||await this[_0x56e441(0x238)][_0x56e441(0x213)]();}async[_0x5f5dc3(0x171)]({userMessage:_0x10d91f,quickActionData:_0x1d0580}){const _0x254dde=_0x5f5dc3;if(!this[_0x254dde(0x238)])throw new _0x5cc404(_0x254dde(0x23f));this[_0x254dde(0x238)][_0x254dde(0x129)]()&&await this[_0x254dde(0x238)][_0x254dde(0x22f)](this[_0x254dde(0x1f5)][_0x254dde(0x123)]()),this[_0x254dde(0x238)]['id']&&this[_0x254dde(0x238)][_0x254dde(0x155)]&&await this[_0x254dde(0x238)][_0x254dde(0x1b5)]({'userMessage':_0x10d91f,'quickActionData':_0x1d0580}),this[_0x254dde(0x274)]();}[_0x5f5dc3(0x274)](){const _0x34db0c=_0x5f5dc3,_0x19cb51=_0x518d08(this[_0x34db0c(0x207)])[_0x34db0c(0x28c)],_0xb0f49=Array[_0x34db0c(0x13e)](_0x19cb51[_0x34db0c(0x200)][_0x34db0c(0x15a)](_0xedcbfe));_0x19cb51[_0x34db0c(0x1fe)](_0x1da632=>{const _0x2d04f5=_0x34db0c;_0xb0f49[_0x2d04f5(0x21e)](_0x3089c5=>_0x1da632[_0x2d04f5(0x20a)](_0x3089c5));});}[_0x5f5dc3(0x1f2)](){const _0x5856dc=_0x5f5dc3;console[_0x5856dc(0x1d6)](_0x5856dc(0x202));}[_0x5f5dc3(0x278)](_0x20a4c0){const _0x50102a=_0x5f5dc3;this[_0x50102a(0x28b)][_0x50102a(0x22e)](_0x20a4c0);}[_0x5f5dc3(0x20e)](_0x328852){const _0x25c97b=_0x5f5dc3;_0x2cf3bc(_0x328852[_0x25c97b(0x13b)]);}[_0x5f5dc3(0x1bf)](_0x5077b8){const _0x3b5589=_0x5f5dc3;this[_0x3b5589(0x238)]?.[_0x3b5589(0x1b4)](_0x5077b8);}[_0x5f5dc3(0x1a6)](){const _0x1468a9=_0x5f5dc3;this[_0x1468a9(0x238)]?.[_0x1468a9(0x133)]();}[_0x5f5dc3(0x282)](){const _0x3ad51b=_0x5f5dc3;this[_0x3ad51b(0x238)]?.[_0x3ad51b(0x132)]();}[_0x5f5dc3(0x223)](_0x3bb4bb){const _0x5d33e1=_0x5f5dc3,[_0x523c1f,_0x329568]=_0x3bb4bb[_0x5d33e1(0x15f)](':'),_0x117d67=this[_0x5d33e1(0x238)][_0x5d33e1(0x263)](_0x523c1f),_0x23d603=_0x117d67[_0x5d33e1(0x1d5)](_0x329568);return{'interaction':_0x117d67,'reply':_0x23d603};}[_0x5f5dc3(0x1d0)](_0x45250c,_0x54750a=!0x1){const _0x588e5d=_0x5f5dc3,_0x23f127=_0x518d08(this[_0x588e5d(0x207)]),_0xfdda5c={'target':_0x23f127[_0x588e5d(0x21a)][_0x588e5d(0x1da)][_0x588e5d(0x26a)][_0x588e5d(0x270)](_0x23f127[_0x588e5d(0x21a)][_0x588e5d(0x24c)][_0x588e5d(0x230)](_0x45250c)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x54750a};_0x54750a&&(_0xfdda5c[_0x588e5d(0x187)]=!0x0),_0x5dae96(_0xfdda5c);}[_0x5f5dc3(0x19d)](_0xfb1de8,_0x1d4cac=!0x1){const _0x27fe5e=_0x5f5dc3;this[_0x27fe5e(0x28b)][_0x27fe5e(0x193)](_0xfb1de8||_0x28fa95(this[_0x27fe5e(0x207)][_0x27fe5e(0x16e)],_0x27fe5e(0x1f0)),_0x1d4cac);}async[_0x5f5dc3(0x209)]({reply:_0x564250,renderingStrategy:_0x339655}){const _0x382e17=_0x5f5dc3,{id:_0x21c1cc,isDone:_0xdae6ea,type:_0x17e8ea,parsedContent:_0x201dd8}=_0x564250;if(_0x382e17(0x268)===_0x17e8ea){const _0x1fd552=_0x564250[_0x382e17(0x287)]({'showDiff':this[_0x382e17(0x28b)][_0x382e17(0x1ad)]});await this[_0x382e17(0x28b)][_0x382e17(0x190)]({'id':_0x21c1cc,'parts':_0x1fd552,'renderingStrategy':_0x339655,'isDone':_0xdae6ea});}else _0x382e17(0x185)===_0x17e8ea&&await this[_0x382e17(0x28b)][_0x382e17(0x1dd)]({'id':_0x21c1cc,'parsedContent':_0x201dd8,'renderingStrategy':_0x339655,'isDone':_0xdae6ea});_0xdae6ea&&_0x564250[_0x382e17(0x24d)][_0x382e17(0x15e)]>0x0&&this[_0x382e17(0x28b)][_0x382e17(0x1e7)](_0x21c1cc,_0x564250[_0x382e17(0x24d)]);}async[_0x5f5dc3(0x23c)](){const _0x3987b8=_0x5f5dc3,_0x1bf50d=this[_0x3987b8(0x238)]?.[_0x3987b8(0x134)];_0x1bf50d&&(_0x1bf50d[_0x3987b8(0x14f)](),this[_0x3987b8(0x28b)][_0x3987b8(0x28e)](_0x1bf50d));}async[_0x5f5dc3(0x16b)](){const _0x593805=_0x5f5dc3,_0x3170b7=this[_0x593805(0x238)]?.[_0x593805(0x134)];if(_0x3170b7){for await(const _0x214d34 of _0x3170b7[_0x593805(0x195)])await this[_0x593805(0x209)]({'reply':_0x214d34,'renderingStrategy':_0x593805(0x269)});}}[_0x5f5dc3(0x125)](_0x43c5f9){const _0x472717=_0x5f5dc3,_0xc1bfe7={'positiveCount':_0x43c5f9[_0x472717(0x289)][_0x472717(0x226)](_0x52776e=>_0x472717(0x1d1)===_0x52776e[_0x472717(0x276)])[_0x472717(0x15e)],'totalCount':_0x43c5f9[_0x472717(0x289)][_0x472717(0x15e)],'modificationId':_0x43c5f9['id']},_0x431929=this[_0x472717(0x238)][_0x472717(0x263)](_0x43c5f9[_0x472717(0x1eb)])[_0x472717(0x13c)];this[_0x472717(0x124)][_0x472717(0x169)](this[_0x472717(0x238)]['id'],_0x431929,_0xc1bfe7);}}
|
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x16874d=_0x7ba9;(function(_0x5b3a85,_0x358f3d){const _0x34ca06=_0x7ba9,_0x127a77=_0x5b3a85();while(!![]){try{const _0x123781=parseInt(_0x34ca06(0x1f0))/0x1*(parseInt(_0x34ca06(0x24b))/0x2)+-parseInt(_0x34ca06(0x1ed))/0x3+-parseInt(_0x34ca06(0x258))/0x4+-parseInt(_0x34ca06(0x202))/0x5*(parseInt(_0x34ca06(0x200))/0x6)+-parseInt(_0x34ca06(0x22f))/0x7*(-parseInt(_0x34ca06(0x26b))/0x8)+parseInt(_0x34ca06(0x1dc))/0x9*(parseInt(_0x34ca06(0x24e))/0xa)+-parseInt(_0x34ca06(0x1e2))/0xb*(-parseInt(_0x34ca06(0x1f8))/0xc);if(_0x123781===_0x358f3d)break;else _0x127a77['push'](_0x127a77['shift']());}catch(_0x44ee26){_0x127a77['push'](_0x127a77['shift']());}}}(_0x4a65,0x8d8b4));function _0x7ba9(_0x53c6e2,_0x1a5998){const _0x4a6539=_0x4a65();return _0x7ba9=function(_0x7ba91a,_0x551572){_0x7ba91a=_0x7ba91a-0x1cb;let _0x7ef5e7=_0x4a6539[_0x7ba91a];return _0x7ef5e7;},_0x7ba9(_0x53c6e2,_0x1a5998);}import{ContextPlugin as _0x5660e1}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x235c00}from'ckeditor5/src/utils.js';import{AIChatView as _0x5049d0}from'./ui/aichatview.js';import{AITabs as _0x175cbf}from'../aitabs/aitabs.js';import{getTranslation as _0x1d7aed}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x409e49}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5875ea}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0xd2def3}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0xa96303}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x130c64}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x111072}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x5660e1{static get[_0x16874d(0x1f3)](){return[_0x175cbf];}[_0x16874d(0x242)];static get[_0x16874d(0x20b)](){const _0xdd4ae4=_0x16874d;return _0xdd4ae4(0x26e);}static get[_0x16874d(0x209)](){return!0x0;}static get[_0x16874d(0x245)](){return!0x0;}[_0x16874d(0x1cb)]=_0x16874d(0x1ea);[_0x16874d(0x24f)]=!0x0;[_0x16874d(0x266)];[_0x16874d(0x22c)];[_0x16874d(0x207)]=void 0x0;[_0x16874d(0x217)]=!0x1;constructor(_0x5ed250){const _0x5c8b74=_0x16874d;super(_0x5ed250);const _0x24467a=this[_0x5c8b74(0x25a)][_0x5c8b74(0x271)][_0x5c8b74(0x203)](_0x5c8b74(0x243));this[_0x5c8b74(0x1f2)](_0x5c8b74(0x26d),!0x1),this[_0x5c8b74(0x266)]=new _0xd2def3(),this[_0x5c8b74(0x242)]=new _0x5049d0(this[_0x5c8b74(0x25a)][_0x5c8b74(0x222)],{'showResizeButton':_0x24467a[_0x5c8b74(0x20d)],'contextResourcesSearchInputVisibleFrom':this[_0x5c8b74(0x25a)][_0x5c8b74(0x221)][_0x5c8b74(0x203)](_0x5c8b74(0x238))}),this[_0x5c8b74(0x242)][_0x5c8b74(0x219)](..._0xa96303)['to'](this),this[_0x5c8b74(0x242)]['on'](_0x5c8b74(0x1f6),(_0x38fd1f,{showDiff:_0x536bcf})=>{const _0x359cb4=_0x5c8b74;this[_0x359cb4(0x24f)]=_0x536bcf;}),_0x24467a[_0x5c8b74(0x227)][_0x5c8b74(0x257)]({'id':_0x5c8b74(0x22e),'buttonLabel':_0x1d7aed(this[_0x5c8b74(0x25a)][_0x5c8b74(0x222)],_0x5c8b74(0x255)),'buttonIcon':_0x409e49,'order':0x0,'content':this[_0x5c8b74(0x242)]}),this[_0x5c8b74(0x242)][_0x5c8b74(0x263)][_0x5c8b74(0x1fa)](_0x5c8b74(0x23f))['to'](this,_0x5c8b74(0x26d),_0x2bd7bb=>_0x2bd7bb),this[_0x5c8b74(0x242)][_0x5c8b74(0x220)][_0x5c8b74(0x1fa)](_0x5c8b74(0x25b))['to'](this,_0x5c8b74(0x26d),_0x4eb5ec=>_0x4eb5ec),this[_0x5c8b74(0x242)][_0x5c8b74(0x263)][_0x5c8b74(0x1da)](this[_0x5c8b74(0x1f4)]()),this[_0x5c8b74(0x1fa)](_0x5c8b74(0x251))['to'](this[_0x5c8b74(0x242)][_0x5c8b74(0x263)],_0x5c8b74(0x251));}[_0x16874d(0x223)](){const _0x186b7d=_0x16874d;super[_0x186b7d(0x223)](),this[_0x186b7d(0x207)]&&clearInterval(this[_0x186b7d(0x207)]);}[_0x16874d(0x230)](_0x387664){const _0x248cdb=_0x16874d;this[_0x248cdb(0x242)][_0x248cdb(0x220)][_0x248cdb(0x1e6)](),this[_0x248cdb(0x242)][_0x248cdb(0x263)][_0x248cdb(0x225)](),this[_0x248cdb(0x242)][_0x248cdb(0x263)][_0x248cdb(0x1d3)](_0x387664[_0x248cdb(0x1e7)],!this[_0x248cdb(0x25a)][_0x248cdb(0x221)][_0x248cdb(0x203)](_0x248cdb(0x24d))),this[_0x248cdb(0x272)]({'id':_0x248cdb(0x21e),'staticMessage':_0x1d7aed(this[_0x248cdb(0x25a)][_0x248cdb(0x222)],_0x248cdb(0x235))});}[_0x16874d(0x272)]({id:_0x292170,staticMessage:_0x4af071}){const _0x1aab1d=_0x16874d;this[_0x1aab1d(0x242)][_0x1aab1d(0x220)][_0x1aab1d(0x1ce)](_0x1aab1d(0x25d),{'id':_0x292170,'initialContent':_0x1aab1d(0x1d0)+_0x4af071+_0x1aab1d(0x267)});}[_0x16874d(0x21f)](_0x1d0698){const _0xeab08e=_0x16874d,_0x1d3521=_0x1d0698[_0xeab08e(0x273)]?.[_0xeab08e(0x1e5)]||_0x1d0698[_0xeab08e(0x241)];this[_0xeab08e(0x242)][_0xeab08e(0x220)][_0xeab08e(0x1ce)](_0xeab08e(0x1ee),{'contextItems':Array[_0xeab08e(0x24c)](_0x1d0698[_0xeab08e(0x1cc)][_0xeab08e(0x204)]()),'initialContent':_0xeab08e(0x1d0)+_0x1d3521+_0xeab08e(0x267),'id':_0x1d0698['id']});}[_0x16874d(0x201)]({errorMessage:_0xc19911,id:_0x1ee1e9}){const _0x44f848=_0x16874d;this[_0x44f848(0x242)][_0x44f848(0x220)][_0x44f848(0x1ce)](_0x44f848(0x21b),{'initialContent':_0x44f848(0x1d0)+_0xc19911+_0x44f848(0x267),'id':_0x1ee1e9});}[_0x16874d(0x208)](_0x45de60){const _0x5f9491=_0x16874d;return this[_0x5f9491(0x266)][_0x5f9491(0x21a)](async()=>{const _0x3ba356=_0x5f9491;this[_0x3ba356(0x242)][_0x3ba356(0x220)][_0x3ba356(0x1ce)](_0x3ba356(0x25d),{'id':_0x45de60[_0x3ba356(0x1e1)]+':'+_0x45de60['id']}),this[_0x3ba356(0x20c)](null);});}async[_0x16874d(0x1d9)](_0x395489){const _0x473cca=_0x16874d,_0x40ff16=_0x130c64(this[_0x473cca(0x25a)]);let _0x5630ea=_0x40ff16[_0x473cca(0x221)][_0x473cca(0x203)](_0x473cca(0x25e))||[..._0x111072];if(_0x40ff16[_0x473cca(0x271)][_0x473cca(0x237)](_0x473cca(0x23e))){if(!this[_0x473cca(0x217)]){this[_0x473cca(0x217)]=!0x0;const _0x3e21d9=_0x40ff16[_0x473cca(0x22a)][_0x473cca(0x203)](_0x473cca(0x211));this[_0x473cca(0x242)][_0x473cca(0x220)][_0x473cca(0x1fa)](_0x473cca(0x212))['to'](_0x3e21d9,_0x473cca(0x218));}}else _0x5630ea=_0x5630ea[_0x473cca(0x1f9)](_0x29a294=>_0x473cca(0x261)!=_0x29a294);return this[_0x473cca(0x266)][_0x473cca(0x21a)](async()=>{const _0x57001d=_0x473cca;this[_0x57001d(0x242)][_0x57001d(0x220)][_0x57001d(0x1ce)](_0x57001d(0x269),{'id':_0x395489[_0x57001d(0x1e1)]+':'+_0x395489['id'],'areActionsDisabled':_0x395489[_0x57001d(0x259)],'showDiff':this[_0x57001d(0x24f)],'availableActions':_0x5630ea}),this[_0x57001d(0x20c)](null);});}[_0x16874d(0x1e8)](_0x57b1f1,_0x57dea0){const _0x2c08d0=_0x16874d,_0x164c3f=this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x22d)][_0x2c08d0(0x21c)];if(_0x164c3f instanceof _0x5875ea)return this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x22d)][_0x2c08d0(0x25c)](_0x164c3f),void this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x1ce)](_0x2c08d0(0x213),{'id':_0x57b1f1['id'],'capabilities':{'isWebSearchEnabled':_0x164c3f[_0x2c08d0(0x214)][_0x2c08d0(0x23b)]||_0x57dea0[_0x2c08d0(0x23b)],'isReasoningEnabled':_0x164c3f[_0x2c08d0(0x214)][_0x2c08d0(0x1d5)]||_0x57dea0[_0x2c08d0(0x1d5)]}});this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x1ce)](_0x2c08d0(0x213),{'id':_0x57b1f1['id'],'capabilities':_0x57dea0});}[_0x16874d(0x26f)](_0x25e8c2){const _0x3f37d3=_0x16874d,_0x36365e=this[_0x3f37d3(0x242)][_0x3f37d3(0x220)][_0x3f37d3(0x22d)][_0x3f37d3(0x210)](_0x21a62e=>_0x21a62e[_0x3f37d3(0x25f)]['id']==_0x25e8c2['id']&&_0x21a62e instanceof _0x5875ea);_0x36365e&&_0x36365e[_0x3f37d3(0x1f2)](_0x3f37d3(0x1eb),_0x25e8c2[_0x3f37d3(0x1eb)]);}async[_0x16874d(0x1f7)](_0xf18282){const _0x25d95f=_0x16874d,_0x186250=_0xf18282[_0x25d95f(0x1d4)]||this[_0x25d95f(0x1cb)];return this[_0x25d95f(0x266)][_0x25d95f(0x21a)](async _0x3296c0=>{const _0x4a261b=_0x25d95f;await this[_0x4a261b(0x242)][_0x4a261b(0x220)][_0x4a261b(0x234)]({..._0xf18282,'abortSignal':_0x3296c0,'renderingStrategy':_0x186250}),_0xf18282[_0x4a261b(0x1e3)]&&this[_0x4a261b(0x26c)](_0xf18282['id']);});}[_0x16874d(0x1f1)](_0x57f399,_0x132488){const _0x399309=_0x16874d;this[_0x399309(0x242)][_0x399309(0x220)][_0x399309(0x1d2)](_0x57f399,_0x132488);}async[_0x16874d(0x1d8)](_0x4d9904){const _0x42ea9c=_0x16874d,_0x59d54a=_0x4d9904[_0x42ea9c(0x1d4)]||this[_0x42ea9c(0x1cb)];return this[_0x42ea9c(0x266)][_0x42ea9c(0x21a)](async _0x2fae03=>{const _0x5341ac=_0x42ea9c;await this[_0x5341ac(0x242)][_0x5341ac(0x220)][_0x5341ac(0x254)]({..._0x4d9904,'abortSignal':_0x2fae03,'renderingStrategy':_0x59d54a}),_0x4d9904[_0x5341ac(0x1e3)]&&this[_0x5341ac(0x26c)](_0x4d9904['id']);});}[_0x16874d(0x224)](_0x166726){const _0x4271ef=_0x16874d;this[_0x4271ef(0x242)][_0x4271ef(0x220)][_0x4271ef(0x24a)](_0x166726);}[_0x16874d(0x26c)](_0x479d83){const _0x52d562=_0x16874d;this[_0x52d562(0x242)][_0x52d562(0x220)][_0x52d562(0x239)](_0x479d83);}[_0x16874d(0x253)](_0x547b73){const _0x48727b=_0x16874d;this[_0x48727b(0x242)][_0x48727b(0x220)][_0x48727b(0x233)]()[_0x48727b(0x1f9)](_0x2d3d23=>_0x2d3d23[_0x48727b(0x268)](_0x547b73))[_0x48727b(0x265)](_0xf3c739=>this[_0x48727b(0x242)][_0x48727b(0x220)][_0x48727b(0x26a)](_0xf3c739));}[_0x16874d(0x236)](){const _0x10753a=_0x16874d;this[_0x10753a(0x20c)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x10753a(0x242)][_0x10753a(0x263)][_0x10753a(0x1df)](!this[_0x10753a(0x25a)][_0x10753a(0x221)][_0x10753a(0x203)](_0x10753a(0x24d))),this[_0x10753a(0x26d)]=!0x0,this[_0x10753a(0x242)][_0x10753a(0x220)][_0x10753a(0x226)]();}[_0x16874d(0x229)](_0x399fe6){const _0x1b361a=_0x16874d;this[_0x1b361a(0x266)][_0x1b361a(0x20f)](),this[_0x1b361a(0x242)][_0x1b361a(0x220)][_0x1b361a(0x233)]()[_0x1b361a(0x1f9)](_0x103c8e=>_0x103c8e[_0x1b361a(0x268)](_0x399fe6['id']))[_0x1b361a(0x265)](_0xc90d24=>this[_0x1b361a(0x26c)](_0xc90d24)),this[_0x1b361a(0x26d)]=!0x1,this[_0x1b361a(0x242)][_0x1b361a(0x220)][_0x1b361a(0x252)]();}async[_0x16874d(0x1fb)](){const _0x48defc=_0x16874d;return this[_0x48defc(0x266)][_0x48defc(0x246)][_0x48defc(0x247)](()=>{const _0x387daa=_0x48defc;this[_0x387daa(0x26d)]=!0x1,this[_0x387daa(0x242)][_0x387daa(0x220)][_0x387daa(0x252)]();});}[_0x16874d(0x216)](_0x3b20c4,_0x404179){const _0x1d6ae2=_0x16874d;this[_0x1d6ae2(0x242)][_0x1d6ae2(0x263)][_0x1d6ae2(0x216)](_0x3b20c4,_0x404179);}[_0x16874d(0x1de)](_0x146eb3){const _0x3a4b92=_0x16874d;this[_0x3a4b92(0x242)][_0x3a4b92(0x263)][_0x3a4b92(0x1de)](_0x146eb3);}[_0x16874d(0x1e4)](_0x2fa1d6,_0x3cfd82){const _0x49aae3=_0x16874d;this[_0x49aae3(0x242)][_0x49aae3(0x263)][_0x49aae3(0x1e4)](_0x2fa1d6,_0x3cfd82);}[_0x16874d(0x1ff)](_0x40c7b7){const _0x49e8e1=_0x16874d;this[_0x49e8e1(0x242)][_0x49e8e1(0x263)][_0x49e8e1(0x1ff)](_0x40c7b7);}[_0x16874d(0x1db)](_0x7bac38){const _0x187bf0=_0x16874d;this[_0x187bf0(0x242)][_0x187bf0(0x263)][_0x187bf0(0x1db)](_0x7bac38);}[_0x16874d(0x249)](){const _0x229c4e=_0x16874d;this[_0x229c4e(0x242)][_0x229c4e(0x263)][_0x229c4e(0x249)]();}[_0x16874d(0x21d)](){const _0x374b44=_0x16874d;this[_0x374b44(0x242)][_0x374b44(0x263)][_0x374b44(0x21d)]();}[_0x16874d(0x248)](_0x5d0105,_0x16940f,_0x2e36e4){const _0x9472fc=_0x16874d;this[_0x9472fc(0x242)][_0x9472fc(0x263)][_0x9472fc(0x248)](_0x5d0105,_0x16940f,_0x2e36e4);}[_0x16874d(0x1fc)](){const _0x14d6ef=_0x16874d;this[_0x14d6ef(0x242)][_0x14d6ef(0x263)][_0x14d6ef(0x1fc)](),this[_0x14d6ef(0x242)][_0x14d6ef(0x263)][_0x14d6ef(0x1da)](this[_0x14d6ef(0x1f4)]());}[_0x16874d(0x1d6)](_0x1ba8f3){const _0x1cdb55=_0x16874d;this[_0x1cdb55(0x242)][_0x1cdb55(0x263)][_0x1cdb55(0x1d6)](_0x1ba8f3);}[_0x16874d(0x1fe)](_0x37f512){const _0xe542c0=_0x16874d;this[_0xe542c0(0x242)][_0xe542c0(0x263)][_0xe542c0(0x1e9)](_0x37f512[_0xe542c0(0x23b)]),this[_0xe542c0(0x242)][_0xe542c0(0x263)][_0xe542c0(0x250)](_0x37f512[_0xe542c0(0x1d5)]),this[_0xe542c0(0x242)][_0xe542c0(0x263)][_0xe542c0(0x1da)](this[_0xe542c0(0x1f4)](_0x37f512));}[_0x16874d(0x260)](_0x1baf1e,_0x37007a){const _0x5dc50f=_0x16874d;this[_0x5dc50f(0x242)][_0x5dc50f(0x263)][_0x5dc50f(0x262)](_0x1baf1e),_0x37007a&&this[_0x5dc50f(0x242)][_0x5dc50f(0x263)][_0x5dc50f(0x1df)](!0x1);}[_0x16874d(0x22b)](_0x3b33f0){const _0x15dcf7=_0x16874d;this[_0x15dcf7(0x1cb)]=_0x3b33f0;}[_0x16874d(0x215)](_0x297f86){const _0x538c35=_0x16874d;this[_0x538c35(0x242)][_0x538c35(0x220)][_0x538c35(0x215)](_0x297f86);}[_0x16874d(0x1dd)](){const _0x4b16e7=_0x16874d;this[_0x4b16e7(0x240)](_0x1d7aed(this[_0x4b16e7(0x25a)][_0x4b16e7(0x222)],_0x4b16e7(0x255)));}[_0x16874d(0x240)](_0x18c675,_0x1fb5b3=!0x1){const _0x29dfb7=_0x16874d;if(_0x1fb5b3&&!_0x235c00()&&_0x18c675[_0x29dfb7(0x1f5)])return this[_0x29dfb7(0x242)][_0x29dfb7(0x1d7)][_0x29dfb7(0x20a)]='',void this[_0x29dfb7(0x1e0)](_0x18c675);this[_0x29dfb7(0x242)][_0x29dfb7(0x1d7)][_0x29dfb7(0x20a)]=_0x18c675;}[_0x16874d(0x20c)](_0x5c53ba){const _0x2c7b53=_0x16874d,_0x451ee7=this[_0x2c7b53(0x1d1)](_0x5c53ba);this[_0x2c7b53(0x242)][_0x2c7b53(0x220)][_0x2c7b53(0x20c)](_0x451ee7);}[_0x16874d(0x1e0)](_0x55a9c9){const _0xff5cf6=_0x16874d;let _0x534a99=0x0;clearInterval(this[_0xff5cf6(0x207)]),this[_0xff5cf6(0x207)]=setInterval(()=>{const _0x3d743b=_0xff5cf6;this[_0x3d743b(0x242)][_0x3d743b(0x1d7)][_0x3d743b(0x20a)]=this[_0x3d743b(0x242)][_0x3d743b(0x1d7)][_0x3d743b(0x20a)]+_0x55a9c9[_0x534a99],_0x534a99++,_0x534a99===_0x55a9c9[_0x3d743b(0x1f5)]&&clearInterval(this[_0x3d743b(0x207)]);},0x1e);}[_0x16874d(0x232)](_0x17b212){const _0xecd03d=_0x16874d;this[_0xecd03d(0x242)][_0xecd03d(0x1d7)][_0xecd03d(0x1fd)]=_0x17b212;}[_0x16874d(0x1d1)](_0x5a003d){const _0x1a4753=_0x16874d;return _0x5a003d?_0x5a003d[_0x1a4753(0x23b)]&&_0x5a003d[_0x1a4753(0x1d5)]?_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x23d)):_0x5a003d[_0x1a4753(0x23b)]?_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x244)):_0x5a003d[_0x1a4753(0x1d5)]?_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x270)):_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x23c)):'';}[_0x16874d(0x1f4)](_0x230280){const _0x5e7d17=_0x16874d;return _0x230280?_0x230280[_0x5e7d17(0x23b)]&&_0x230280[_0x5e7d17(0x1d5)]?_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x231)):_0x230280[_0x5e7d17(0x23b)]?_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x1cd)):_0x230280[_0x5e7d17(0x1d5)]?_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x1ef)):_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x205)):_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x205));}[_0x16874d(0x1ec)](_0x186b2f,_0xe73f21,_0x451419,_0x3f1f29){const _0x19e450=_0x16874d;this[_0x19e450(0x242)][_0x19e450(0x1ec)](_0x186b2f,_0xe73f21,_0x451419,_0x3f1f29);}[_0x16874d(0x206)](_0x1558d2){const _0x9546ae=_0x16874d;this[_0x9546ae(0x242)][_0x9546ae(0x206)](_0x1558d2);}[_0x16874d(0x228)](){const _0x5c1f43=_0x16874d;this[_0x5c1f43(0x242)][_0x5c1f43(0x263)][_0x5c1f43(0x228)]();}[_0x16874d(0x256)](_0x8a940c,_0x1ce572){const _0x6e5af4=_0x16874d;this[_0x6e5af4(0x242)][_0x6e5af4(0x220)][_0x6e5af4(0x264)](_0x8a940c,_0x1ce572);}[_0x16874d(0x226)](){const _0x5220df=_0x16874d;this[_0x5220df(0x242)][_0x5220df(0x220)][_0x5220df(0x226)]();}[_0x16874d(0x23a)](){const _0x427091=_0x16874d;this[_0x427091(0x242)][_0x427091(0x263)][_0x427091(0x1cf)]=!0x0;}[_0x16874d(0x20e)](){const _0x20e308=_0x16874d;this[_0x20e308(0x242)][_0x20e308(0x263)][_0x20e308(0x1cf)]=!0x1;}}function _0x4a65(){const _0xd532fa=['value','delegate','enqueue','error-message','last','clearConversationContextUI','conversation-start','addFeedItemUserMessage','chatFeed','config','locale','destroy','updateFeedItemAIReplySuggestionPartState','enableModelSelector','startAutoScroll','view','focusPromptInput','stopInteraction','commands','setFeedItemRenderingStrategy','_interactionPromiseResolver','children','chat','95494gpaqFz','createConversation','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','setIsMaximized','getItemIds','updateReplyItem','AI_CHAT_WELCOME_MESSAGE','startInteraction','has','ai.chat.context.searchInputVisibleFrom','markItemAsDone','disableControls','isWebSearchEnabled','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','TrackChanges','isLoading','setConversationTitle','userMessage','_view','AITabs','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','isPremiumPlugin','queueEmptyPromise','then','updateResourceState','clearPendingContextUI','updateSuggestionPartState','10ckxoub','from','ai.chat.models.modelSelectorAlwaysVisible','10HCopNn','showDiff','setReasoning','isModelAvailable','stopAutoScroll','removeFeedInteraction','updateSuggestionItem','AI_CHAT_HEADING','scrollFeedToSuggestion','addTab','3217840VDMIul','areActionsDisabled','context','isPending','remove','ai-reply','ai.availableReplyActions','options','setSelectedModel','insertSuggestion','setModel','chatControls','scrollToSuggestion','forEach','_promiseQueue','</p>','startsWith','ai-suggestion-reply','removeItem','88tfKBCc','markFeedItemAsDone','isBusy','AIChatUI','updateFeedInteractionHeader','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','plugins','addFeedItemStaticMessage','quickActionData','feedItemRenderingStrategy','contextItems','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','addItem','isDisabled','<p>','_getLoadingMessage','updateWebSources','setModelList','renderingStrategy','isReasoningEnabled','setAddContextOptions','chatHeader','updateFeedItemAIReplySuggestionContent','addFeedItemAISuggestion','setInputPlaceholder','setConversationContext','2542941TudlfL','resetConversationTitle','removeContextItem','disableModelSelector','_animateConversationTitle','interactionId','135179QJvRTK','isDone','setContextItemLoading','displayedPrompt','clear','availableModels','addFeedInteractionHeader','setWebSearch','streaming','isVisible','populateSourceResourceBalloon','3106488LYVlUI','user-message','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','138615OhVKrz','updateFeedItemAIReplySources','set','requires','_getInputPlaceholder','length','toggleSuggestionDisplayMode','updateFeedItemAIReplyContent','1728ZHoQAV','filter','bind','finishInteraction','resetMessageInput','isMaximized','updateCapabilities','setIsUploadInProgress','12sVjSTJ','addFeedItemError','1188955QDAzyv','get','values','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','closeSourceResourceBalloon','_titleAnimationInterval','addFeedItemAIReply','isOfficialPlugin','label','pluginName','setLoadingMessage','showResizeButton','enableControls','abort','find','trackChanges','isTrackChangesOn','interaction-header','capabilities','toggleLoadingSkeleton','addContextItem','_isTrackChangesCommandValueBound'];_0x4a65=function(){return _0xd532fa;};return _0x4a65();}
|
|
23
|
+
const _0x131c27=_0x2307;(function(_0x3979a0,_0x2f4aef){const _0x546889=_0x2307,_0x27ec12=_0x3979a0();while(!![]){try{const _0x2a3b6f=-parseInt(_0x546889(0x1d3))/0x1+parseInt(_0x546889(0x1cf))/0x2+parseInt(_0x546889(0x1d2))/0x3*(parseInt(_0x546889(0x221))/0x4)+parseInt(_0x546889(0x1b4))/0x5+parseInt(_0x546889(0x1b1))/0x6+-parseInt(_0x546889(0x1b8))/0x7*(parseInt(_0x546889(0x222))/0x8)+-parseInt(_0x546889(0x1f2))/0x9;if(_0x2a3b6f===_0x2f4aef)break;else _0x27ec12['push'](_0x27ec12['shift']());}catch(_0x231ca0){_0x27ec12['push'](_0x27ec12['shift']());}}}(_0x2df1,0x44aa9));import{ContextPlugin as _0x420470}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x43525b}from'ckeditor5/src/utils.js';function _0x2307(_0x4d3e97,_0x5d8ac1){const _0x2df1ee=_0x2df1();return _0x2307=function(_0x2307ed,_0x3e5a83){_0x2307ed=_0x2307ed-0x185;let _0x4294bd=_0x2df1ee[_0x2307ed];return _0x4294bd;},_0x2307(_0x4d3e97,_0x5d8ac1);}import{AIChatView as _0x4d4700}from'./ui/aichatview.js';import{AITabs as _0x460375}from'../aitabs/aitabs.js';import{getTranslation as _0x1ba9bd}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x22b432}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5598d7}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x300ef5}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3f2091}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x2df1(){const _0x1572ca=['startsWith','value','quickActionData','</p>','setWebSearch','enableModelSelector','resetMessageInput','_isTrackChangesCommandValueBound','toggleSuggestionDisplayMode','ai.chat.context.searchInputVisibleFrom','contextItems','queueEmptyPromise','plugins','_animateConversationTitle','ai.chat.models.modelSelectorAlwaysVisible','bind','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','availableModels','ai-suggestion-reply','isPending','addFeedItemAISuggestion','commands','setSelectedModel','_view','updateWebSources','closeSourceResourceBalloon','addFeedItemUserMessage','scrollFeedToSuggestion','addItem','setInputPlaceholder','children','3340326XwBSNo','chatHeader','createConversation','1466900Eiohun','isTrackChangesOn','removeContextItem','filter','376194RvcBVY','AIChatUI','stopInteraction','set','chat','startAutoScroll','setLoadingMessage','toggleLoadingSkeleton','addFeedItemAIReply','updateResourceState','isMaximized','isOfficialPlugin','clearPendingContextUI','ai.availableReplyActions','streaming','removeFeedInteraction','areActionsDisabled','isWebSearchEnabled','remove','setAddContextOptions','context','updateCapabilities','resetConversationTitle','844882lCLHRf','clearConversationContextUI','requires','27lUzlUA','229202YKuawQ','setModelList','addFeedInteractionHeader','_getLoadingMessage','displayedPrompt','delegate','length','chatFeed','renderingStrategy','setModel','updateFeedInteractionHeader','insertSuggestion','removeItem','showDiff','has','markItemAsDone','AITabs','_promiseQueue','setConversationTitle','updateFeedItemAIReplySources','get','error-message','updateFeedItemAIReplySuggestionPartState','updateReplyItem','pluginName','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','setFeedItemRenderingStrategy','isPremiumPlugin','markFeedItemAsDone','ai-reply','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','2128968gqLgSx','startInteraction','user-message','addTab','interaction-header','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','TrackChanges','isLoading','populateSourceResourceBalloon','updateFeedItemAIReplySuggestionContent','userMessage','disableModelSelector','isVisible','isDone','conversation-start','chatControls','AI_CHAT_WELCOME_MESSAGE','values','isBusy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','updateSuggestionPartState','getItemIds','finishInteraction','addFeedItemStaticMessage','scrollToSuggestion','label','isDisabled','trackChanges','showResizeButton','view','destroy','last','setContextItemLoading','AI_CHAT_HEADING','clear','stopAutoScroll','options','addContextItem','isReasoningEnabled','capabilities','from','_getInputPlaceholder','disableControls','enqueue','find','_interactionPromiseResolver','updateSuggestionItem','5284NEsmaA','80NCbWmO','addFeedItemError','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','abort','_titleAnimationInterval','feedItemRenderingStrategy','interactionId','locale','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','setConversationContext','focusPromptInput','then','isModelAvailable','forEach','updateFeedItemAIReplyContent','setIsUploadInProgress','setIsMaximized','setReasoning','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','<p>','config','enableControls'];_0x2df1=function(){return _0x1572ca;};return _0x2df1();}import{getEditorFromContext as _0x3566ff}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x424639}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x420470{static get[_0x131c27(0x1d1)](){return[_0x460375];}[_0x131c27(0x1a9)];static get[_0x131c27(0x1eb)](){const _0x9aef64=_0x131c27;return _0x9aef64(0x1b9);}static get[_0x131c27(0x1c3)](){return!0x0;}static get[_0x131c27(0x1ee)](){return!0x0;}[_0x131c27(0x227)]=_0x131c27(0x1c6);[_0x131c27(0x1e0)]=!0x0;[_0x131c27(0x1e4)];[_0x131c27(0x21f)];[_0x131c27(0x226)]=void 0x0;[_0x131c27(0x199)]=!0x1;constructor(_0x25ac81){const _0x83618b=_0x131c27;super(_0x25ac81);const _0x2b937b=this[_0x83618b(0x1cc)][_0x83618b(0x19e)][_0x83618b(0x1e7)](_0x83618b(0x1e3));this[_0x83618b(0x1bb)](_0x83618b(0x204),!0x1),this[_0x83618b(0x1e4)]=new _0x300ef5(),this[_0x83618b(0x1a9)]=new _0x4d4700(this[_0x83618b(0x1cc)][_0x83618b(0x229)],{'showResizeButton':_0x2b937b[_0x83618b(0x20e)],'contextResourcesSearchInputVisibleFrom':this[_0x83618b(0x1cc)][_0x83618b(0x190)][_0x83618b(0x1e7)](_0x83618b(0x19b))}),this[_0x83618b(0x1a9)][_0x83618b(0x1d8)](..._0x3f2091)['to'](this),this[_0x83618b(0x1a9)]['on'](_0x83618b(0x19a),(_0x394d21,{showDiff:_0x33b253})=>{const _0x4418d6=_0x83618b;this[_0x4418d6(0x1e0)]=_0x33b253;}),_0x2b937b[_0x83618b(0x20f)][_0x83618b(0x1f5)]({'id':_0x83618b(0x1bc),'buttonLabel':_0x1ba9bd(this[_0x83618b(0x1cc)][_0x83618b(0x229)],_0x83618b(0x213)),'buttonIcon':_0x22b432,'order':0x0,'content':this[_0x83618b(0x1a9)]}),this[_0x83618b(0x1a9)][_0x83618b(0x201)][_0x83618b(0x1a1)](_0x83618b(0x1f9))['to'](this,_0x83618b(0x204),_0x453c62=>_0x453c62),this[_0x83618b(0x1a9)][_0x83618b(0x1da)][_0x83618b(0x1a1)](_0x83618b(0x1a5))['to'](this,_0x83618b(0x204),_0x130d6c=>_0x130d6c),this[_0x83618b(0x1a9)][_0x83618b(0x201)][_0x83618b(0x1af)](this[_0x83618b(0x21b)]()),this[_0x83618b(0x1a1)](_0x83618b(0x188))['to'](this[_0x83618b(0x1a9)][_0x83618b(0x201)],_0x83618b(0x188));}[_0x131c27(0x210)](){const _0x3aae57=_0x131c27;super[_0x3aae57(0x210)](),this[_0x3aae57(0x226)]&&clearInterval(this[_0x3aae57(0x226)]);}[_0x131c27(0x1b3)](_0x2a62d7){const _0x55b233=_0x131c27;this[_0x55b233(0x1a9)][_0x55b233(0x1da)][_0x55b233(0x214)](),this[_0x55b233(0x1a9)][_0x55b233(0x201)][_0x55b233(0x197)](),this[_0x55b233(0x1a9)][_0x55b233(0x201)][_0x55b233(0x1d4)](_0x2a62d7[_0x55b233(0x1a3)],!this[_0x55b233(0x1cc)][_0x55b233(0x190)][_0x55b233(0x1e7)](_0x55b233(0x1a0))),this[_0x55b233(0x209)]({'id':_0x55b233(0x200),'staticMessage':_0x1ba9bd(this[_0x55b233(0x1cc)][_0x55b233(0x229)],_0x55b233(0x202))});}[_0x131c27(0x209)]({id:_0x4ab7ac,staticMessage:_0x27eb77}){const _0x26a769=_0x131c27;this[_0x26a769(0x1a9)][_0x26a769(0x1da)][_0x26a769(0x1ae)](_0x26a769(0x1f0),{'id':_0x4ab7ac,'initialContent':_0x26a769(0x18f)+_0x27eb77+_0x26a769(0x195)});}[_0x131c27(0x1ac)](_0x3b5c1c){const _0x5f4418=_0x131c27,_0x497ecf=_0x3b5c1c[_0x5f4418(0x194)]?.[_0x5f4418(0x1d7)]||_0x3b5c1c[_0x5f4418(0x1fc)];this[_0x5f4418(0x1a9)][_0x5f4418(0x1da)][_0x5f4418(0x1ae)](_0x5f4418(0x1f4),{'contextItems':Array[_0x5f4418(0x21a)](_0x3b5c1c[_0x5f4418(0x19c)][_0x5f4418(0x203)]()),'initialContent':_0x5f4418(0x18f)+_0x497ecf+_0x5f4418(0x195),'id':_0x3b5c1c['id']});}[_0x131c27(0x223)]({errorMessage:_0x2bae81,id:_0x25f984}){const _0x154c62=_0x131c27;this[_0x154c62(0x1a9)][_0x154c62(0x1da)][_0x154c62(0x1ae)](_0x154c62(0x1e8),{'initialContent':_0x154c62(0x18f)+_0x2bae81+_0x154c62(0x195),'id':_0x25f984});}[_0x131c27(0x1c0)](_0x5cb3b7){const _0xca6ef9=_0x131c27;return this[_0xca6ef9(0x1e4)][_0xca6ef9(0x21d)](async()=>{const _0x5ef6c4=_0xca6ef9;this[_0x5ef6c4(0x1a9)][_0x5ef6c4(0x1da)][_0x5ef6c4(0x1ae)](_0x5ef6c4(0x1f0),{'id':_0x5cb3b7[_0x5ef6c4(0x228)]+':'+_0x5cb3b7['id']}),this[_0x5ef6c4(0x1be)](null);});}async[_0x131c27(0x1a6)](_0x263806){const _0x41517e=_0x131c27,_0x2b0553=_0x3566ff(this[_0x41517e(0x1cc)]);let _0x94e7e=_0x2b0553[_0x41517e(0x190)][_0x41517e(0x1e7)](_0x41517e(0x1c5))||[..._0x424639];if(_0x2b0553[_0x41517e(0x19e)][_0x41517e(0x1e1)](_0x41517e(0x1f8))){if(!this[_0x41517e(0x199)]){this[_0x41517e(0x199)]=!0x0;const _0x248f5c=_0x2b0553[_0x41517e(0x1a7)][_0x41517e(0x1e7)](_0x41517e(0x20d));this[_0x41517e(0x1a9)][_0x41517e(0x1da)][_0x41517e(0x1a1)](_0x41517e(0x1b5))['to'](_0x248f5c,_0x41517e(0x193));}}else _0x94e7e=_0x94e7e[_0x41517e(0x1b7)](_0x49c870=>_0x41517e(0x1de)!=_0x49c870);return this[_0x41517e(0x1e4)][_0x41517e(0x21d)](async()=>{const _0x51765b=_0x41517e;this[_0x51765b(0x1a9)][_0x51765b(0x1da)][_0x51765b(0x1ae)](_0x51765b(0x1a4),{'id':_0x263806[_0x51765b(0x228)]+':'+_0x263806['id'],'areActionsDisabled':_0x263806[_0x51765b(0x1c8)],'showDiff':this[_0x51765b(0x1e0)],'availableActions':_0x94e7e}),this[_0x51765b(0x1be)](null);});}[_0x131c27(0x1d5)](_0x8050c3,_0x3bc9c7){const _0x29dc05=_0x131c27,_0x1e03af=this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1b0)][_0x29dc05(0x211)];if(_0x1e03af instanceof _0x5598d7)return this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1b0)][_0x29dc05(0x1ca)](_0x1e03af),void this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1ae)](_0x29dc05(0x1f6),{'id':_0x8050c3['id'],'capabilities':{'isWebSearchEnabled':_0x1e03af[_0x29dc05(0x219)][_0x29dc05(0x1c9)]||_0x3bc9c7[_0x29dc05(0x1c9)],'isReasoningEnabled':_0x1e03af[_0x29dc05(0x219)][_0x29dc05(0x218)]||_0x3bc9c7[_0x29dc05(0x218)]}});this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1ae)](_0x29dc05(0x1f6),{'id':_0x8050c3['id'],'capabilities':_0x3bc9c7});}[_0x131c27(0x1dd)](_0x3af63e){const _0x1c33c6=_0x131c27,_0x23ba73=this[_0x1c33c6(0x1a9)][_0x1c33c6(0x1da)][_0x1c33c6(0x1b0)][_0x1c33c6(0x21e)](_0x50a274=>_0x50a274[_0x1c33c6(0x216)]['id']==_0x3af63e['id']&&_0x50a274 instanceof _0x5598d7);_0x23ba73&&_0x23ba73[_0x1c33c6(0x1bb)](_0x1c33c6(0x1fe),_0x3af63e[_0x1c33c6(0x1fe)]);}async[_0x131c27(0x18a)](_0x51e4b0){const _0xb5c64f=_0x131c27,_0x510054=_0x51e4b0[_0xb5c64f(0x1db)]||this[_0xb5c64f(0x227)];return this[_0xb5c64f(0x1e4)][_0xb5c64f(0x21d)](async _0x24ffe6=>{const _0x5a8d2e=_0xb5c64f;await this[_0x5a8d2e(0x1a9)][_0x5a8d2e(0x1da)][_0x5a8d2e(0x1ea)]({..._0x51e4b0,'abortSignal':_0x24ffe6,'renderingStrategy':_0x510054}),_0x51e4b0[_0x5a8d2e(0x1ff)]&&this[_0x5a8d2e(0x1ef)](_0x51e4b0['id']);});}[_0x131c27(0x1e6)](_0x28042f,_0xc71af6){const _0x481889=_0x131c27;this[_0x481889(0x1a9)][_0x481889(0x1da)][_0x481889(0x1aa)](_0x28042f,_0xc71af6);}async[_0x131c27(0x1fb)](_0x2730a4){const _0x517d91=_0x131c27,_0x1bda93=_0x2730a4[_0x517d91(0x1db)]||this[_0x517d91(0x227)];return this[_0x517d91(0x1e4)][_0x517d91(0x21d)](async _0x25011d=>{const _0x50c4b5=_0x517d91;await this[_0x50c4b5(0x1a9)][_0x50c4b5(0x1da)][_0x50c4b5(0x220)]({..._0x2730a4,'abortSignal':_0x25011d,'renderingStrategy':_0x1bda93}),_0x2730a4[_0x50c4b5(0x1ff)]&&this[_0x50c4b5(0x1ef)](_0x2730a4['id']);});}[_0x131c27(0x1e9)](_0x4c814b){const _0x81b2d3=_0x131c27;this[_0x81b2d3(0x1a9)][_0x81b2d3(0x1da)][_0x81b2d3(0x206)](_0x4c814b);}[_0x131c27(0x1ef)](_0x56111e){const _0x5eb86b=_0x131c27;this[_0x5eb86b(0x1a9)][_0x5eb86b(0x1da)][_0x5eb86b(0x1e2)](_0x56111e);}[_0x131c27(0x1c7)](_0x38152b){const _0x49a19b=_0x131c27;this[_0x49a19b(0x1a9)][_0x49a19b(0x1da)][_0x49a19b(0x207)]()[_0x49a19b(0x1b7)](_0x44ca78=>_0x44ca78[_0x49a19b(0x192)](_0x38152b))[_0x49a19b(0x189)](_0x48ceda=>this[_0x49a19b(0x1a9)][_0x49a19b(0x1da)][_0x49a19b(0x1df)](_0x48ceda));}[_0x131c27(0x1f3)](){const _0x502fb8=_0x131c27;this[_0x502fb8(0x1be)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x502fb8(0x1a9)][_0x502fb8(0x201)][_0x502fb8(0x1fd)](!this[_0x502fb8(0x1cc)][_0x502fb8(0x190)][_0x502fb8(0x1e7)](_0x502fb8(0x1a0))),this[_0x502fb8(0x204)]=!0x0,this[_0x502fb8(0x1a9)][_0x502fb8(0x1da)][_0x502fb8(0x1bd)]();}[_0x131c27(0x1ba)](_0x551000){const _0x2cd798=_0x131c27;this[_0x2cd798(0x1e4)][_0x2cd798(0x225)](),this[_0x2cd798(0x1a9)][_0x2cd798(0x1da)][_0x2cd798(0x207)]()[_0x2cd798(0x1b7)](_0x276e7c=>_0x276e7c[_0x2cd798(0x192)](_0x551000['id']))[_0x2cd798(0x189)](_0x2f51d2=>this[_0x2cd798(0x1ef)](_0x2f51d2)),this[_0x2cd798(0x204)]=!0x1,this[_0x2cd798(0x1a9)][_0x2cd798(0x1da)][_0x2cd798(0x215)]();}async[_0x131c27(0x208)](){const _0x99643=_0x131c27;return this[_0x99643(0x1e4)][_0x99643(0x19d)][_0x99643(0x187)](()=>{const _0x1c5048=_0x99643;this[_0x1c5048(0x204)]=!0x1,this[_0x1c5048(0x1a9)][_0x1c5048(0x1da)][_0x1c5048(0x215)]();});}[_0x131c27(0x217)](_0x18f134,_0x2aa1b6){const _0x15e8c7=_0x131c27;this[_0x15e8c7(0x1a9)][_0x15e8c7(0x201)][_0x15e8c7(0x217)](_0x18f134,_0x2aa1b6);}[_0x131c27(0x1b6)](_0x1d5f7c){const _0x30b525=_0x131c27;this[_0x30b525(0x1a9)][_0x30b525(0x201)][_0x30b525(0x1b6)](_0x1d5f7c);}[_0x131c27(0x212)](_0x428805,_0xccc7d1){const _0x481523=_0x131c27;this[_0x481523(0x1a9)][_0x481523(0x201)][_0x481523(0x212)](_0x428805,_0xccc7d1);}[_0x131c27(0x18b)](_0x52c72d){const _0x5ee84d=_0x131c27;this[_0x5ee84d(0x1a9)][_0x5ee84d(0x201)][_0x5ee84d(0x18b)](_0x52c72d);}[_0x131c27(0x185)](_0x128b63){const _0x358ec9=_0x131c27;this[_0x358ec9(0x1a9)][_0x358ec9(0x201)][_0x358ec9(0x185)](_0x128b63);}[_0x131c27(0x1c4)](){const _0xd25b4a=_0x131c27;this[_0xd25b4a(0x1a9)][_0xd25b4a(0x201)][_0xd25b4a(0x1c4)]();}[_0x131c27(0x1d0)](){const _0x24edc2=_0x131c27;this[_0x24edc2(0x1a9)][_0x24edc2(0x201)][_0x24edc2(0x1d0)]();}[_0x131c27(0x1c1)](_0x2fe131,_0x69e66,_0x5ed7b8){const _0x1419ee=_0x131c27;this[_0x1419ee(0x1a9)][_0x1419ee(0x201)][_0x1419ee(0x1c1)](_0x2fe131,_0x69e66,_0x5ed7b8);}[_0x131c27(0x198)](){const _0x18e8f8=_0x131c27;this[_0x18e8f8(0x1a9)][_0x18e8f8(0x201)][_0x18e8f8(0x198)](),this[_0x18e8f8(0x1a9)][_0x18e8f8(0x201)][_0x18e8f8(0x1af)](this[_0x18e8f8(0x21b)]());}[_0x131c27(0x1cb)](_0x16572f){const _0x3000a6=_0x131c27;this[_0x3000a6(0x1a9)][_0x3000a6(0x201)][_0x3000a6(0x1cb)](_0x16572f);}[_0x131c27(0x1cd)](_0x3bf8aa){const _0x45df41=_0x131c27;this[_0x45df41(0x1a9)][_0x45df41(0x201)][_0x45df41(0x196)](_0x3bf8aa[_0x45df41(0x1c9)]),this[_0x45df41(0x1a9)][_0x45df41(0x201)][_0x45df41(0x18d)](_0x3bf8aa[_0x45df41(0x218)]),this[_0x45df41(0x1a9)][_0x45df41(0x201)][_0x45df41(0x1af)](this[_0x45df41(0x21b)](_0x3bf8aa));}[_0x131c27(0x1a8)](_0x51edc2,_0x20d325){const _0x2cc6c8=_0x131c27;this[_0x2cc6c8(0x1a9)][_0x2cc6c8(0x201)][_0x2cc6c8(0x1dc)](_0x51edc2),_0x20d325&&this[_0x2cc6c8(0x1a9)][_0x2cc6c8(0x201)][_0x2cc6c8(0x1fd)](!0x1);}[_0x131c27(0x1ed)](_0x4c7da8){const _0x56db4d=_0x131c27;this[_0x56db4d(0x227)]=_0x4c7da8;}[_0x131c27(0x1bf)](_0x28ceb8){const _0x3d6da9=_0x131c27;this[_0x3d6da9(0x1a9)][_0x3d6da9(0x1da)][_0x3d6da9(0x1bf)](_0x28ceb8);}[_0x131c27(0x1ce)](){const _0x2d4019=_0x131c27;this[_0x2d4019(0x1e5)](_0x1ba9bd(this[_0x2d4019(0x1cc)][_0x2d4019(0x229)],_0x2d4019(0x213)));}[_0x131c27(0x1e5)](_0x5f4287,_0x1a8409=!0x1){const _0x86e99e=_0x131c27;if(_0x1a8409&&!_0x43525b()&&_0x5f4287[_0x86e99e(0x1d9)])return this[_0x86e99e(0x1a9)][_0x86e99e(0x1b2)][_0x86e99e(0x20b)]='',void this[_0x86e99e(0x19f)](_0x5f4287);this[_0x86e99e(0x1a9)][_0x86e99e(0x1b2)][_0x86e99e(0x20b)]=_0x5f4287;}[_0x131c27(0x1be)](_0x17db17){const _0x4b4c23=_0x131c27,_0x170227=this[_0x4b4c23(0x1d6)](_0x17db17);this[_0x4b4c23(0x1a9)][_0x4b4c23(0x1da)][_0x4b4c23(0x1be)](_0x170227);}[_0x131c27(0x19f)](_0x37dd62){const _0x380261=_0x131c27;let _0x4f7ba1=0x0;clearInterval(this[_0x380261(0x226)]),this[_0x380261(0x226)]=setInterval(()=>{const _0x43e390=_0x380261;this[_0x43e390(0x1a9)][_0x43e390(0x1b2)][_0x43e390(0x20b)]=this[_0x43e390(0x1a9)][_0x43e390(0x1b2)][_0x43e390(0x20b)]+_0x37dd62[_0x4f7ba1],_0x4f7ba1++,_0x4f7ba1===_0x37dd62[_0x43e390(0x1d9)]&&clearInterval(this[_0x43e390(0x226)]);},0x1e);}[_0x131c27(0x18c)](_0x53ee99){const _0x59d1b7=_0x131c27;this[_0x59d1b7(0x1a9)][_0x59d1b7(0x1b2)][_0x59d1b7(0x1c2)]=_0x53ee99;}[_0x131c27(0x1d6)](_0x499f24){const _0x36768b=_0x131c27;return _0x499f24?_0x499f24[_0x36768b(0x1c9)]&&_0x499f24[_0x36768b(0x218)]?_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x224)):_0x499f24[_0x36768b(0x1c9)]?_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x1f1)):_0x499f24[_0x36768b(0x218)]?_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x18e)):_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x1a2)):'';}[_0x131c27(0x21b)](_0x502229){const _0x2c2b2e=_0x131c27;return _0x502229?_0x502229[_0x2c2b2e(0x1c9)]&&_0x502229[_0x2c2b2e(0x218)]?_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x22a)):_0x502229[_0x2c2b2e(0x1c9)]?_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x1ec)):_0x502229[_0x2c2b2e(0x218)]?_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x1f7)):_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x205)):_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x205));}[_0x131c27(0x1fa)](_0x22bf25,_0x2245ee,_0x5c1dde,_0x537ae7){const _0x5e8afd=_0x131c27;this[_0x5e8afd(0x1a9)][_0x5e8afd(0x1fa)](_0x22bf25,_0x2245ee,_0x5c1dde,_0x537ae7);}[_0x131c27(0x1ab)](_0x3ee1ae){const _0x178ccb=_0x131c27;this[_0x178ccb(0x1a9)][_0x178ccb(0x1ab)](_0x3ee1ae);}[_0x131c27(0x186)](){const _0xcfdd69=_0x131c27;this[_0xcfdd69(0x1a9)][_0xcfdd69(0x201)][_0xcfdd69(0x186)]();}[_0x131c27(0x1ad)](_0x16d975,_0x34e731){const _0x7385f1=_0x131c27;this[_0x7385f1(0x1a9)][_0x7385f1(0x1da)][_0x7385f1(0x20a)](_0x16d975,_0x34e731);}[_0x131c27(0x1bd)](){const _0x5b3709=_0x131c27;this[_0x5b3709(0x1a9)][_0x5b3709(0x1da)][_0x5b3709(0x1bd)]();}[_0x131c27(0x21c)](){const _0x29e909=_0x131c27;this[_0x29e909(0x1a9)][_0x29e909(0x201)][_0x29e909(0x20c)]=!0x0;}[_0x131c27(0x191)](){const _0x2f7dc2=_0x131c27;this[_0x2f7dc2(0x1a9)][_0x2f7dc2(0x201)][_0x2f7dc2(0x20c)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x52d18f=_0x3f67;(function(_0x5b0ce9,_0x1c8ab1){const _0x89daf8=_0x3f67,_0x1b01c9=_0x5b0ce9();while(!![]){try{const _0x238e9d=-parseInt(_0x89daf8(0x21a))/0x1+-parseInt(_0x89daf8(0x22b))/0x2*(parseInt(_0x89daf8(0x1f2))/0x3)+-parseInt(_0x89daf8(0x242))/0x4*(-parseInt(_0x89daf8(0x1f7))/0x5)+parseInt(_0x89daf8(0x1fb))/0x6+-parseInt(_0x89daf8(0x24c))/0x7+parseInt(_0x89daf8(0x265))/0x8+parseInt(_0x89daf8(0x23e))/0x9;if(_0x238e9d===_0x1c8ab1)break;else _0x1b01c9['push'](_0x1b01c9['shift']());}catch(_0x2b100d){_0x1b01c9['push'](_0x1b01c9['shift']());}}}(_0x565e,0x7bcf8));import{CKEditorError as _0x3dbe0e,ObservableMixin as _0x991414,uid as _0x29edad}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x24af84,AIContextTextResourceType as _0x470c61}from'../../aicore/model/aicontext.js';import{escape as _0x51f37a}from'es-toolkit/compat';import{errorsMap as _0x4a8de0}from'../../errorsmap.js';function _0x3f67(_0x53e296,_0x235847){const _0x565e76=_0x565e();return _0x3f67=function(_0x3f67bd,_0x416d80){_0x3f67bd=_0x3f67bd-0x1db;let _0x884b3d=_0x565e76[_0x3f67bd];return _0x884b3d;},_0x3f67(_0x53e296,_0x235847);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x52d18f(0x1e5),_0x52d18f(0x1f0),_0x52d18f(0x213),_0x52d18f(0x1fe),_0x52d18f(0x20d),_0x52d18f(0x1ee),_0x52d18f(0x24d),_0x52d18f(0x259),_0x52d18f(0x1e1)];function _0x565e(){const _0x29b085=['isHidden','abort','startsWith','_getCustomSourcesInitialState','5497030GAcBKw','sourceResourcesLoaded','getSentContextItems','getId','MARKDOWN','attributes','removeFromContext','Current\x20document','populateFromMessage','getData','object\x20with\x20content\x20and\x20type\x20properties','_startUploadOperation','getDocument','resourceStateChanged','filter','all','has','map','addResourceToContext','addCurrentDocumentToContext','_pendingContextItems','uploadDocument','_mapContextItemToRequestData','version','sources','3973912hKlJDr','start','_finishContextItemLoading','HTML','name','ai-chat-document-upload-failed','urls','uiId','_ownerId','text/html','uploadProgressChanged','push','addFilesToContext','ai-chat-context-invalid-data','contextItemAdded','_addContextOptionsState','FILE','ai-chat-context-unsupported-type','from','code','_removeContextItem','find','mapContextItemsToRequestData','addContextOptionsChanged','selection','contextItemRemoved','clearPendingContextItems','7626UdlXUH','init','url','TEXT','addToConversationContext','1316835EdTuQF','addSelectionToContext','file-','files','1532712KzENIt','end','_toggleAddCurrentDocumentOptionVisibility','contextSent','enabled','forEach','_addToConversationContextItem','ai-chat-source-not-found','_connector','_addContextItem','uploadUrl','uploadFile','abortController','_convertTextResourceToFile','resources','content','length','ai-chat-url-upload-failed','error','resourceId','removeSelectionFromContext','set','isSelectionInContext','values','contextItemLoadingEnded','ai-chat-resource-no-data','message','hidden','size','document','object','275597zHhHYe','isCurrentDocumentInContext','text/markdown','_ongoingUploads','File','_isResourceInContext','ai-chat-file-upload-failed','isReadOnly','fetchDocument','sessionId','files-','label','ai-request-aborted','_ongoingUploadOperations','_config','type','text/plain','530CysiPn','url-','_findSourceIdsByResourceId','_setAddContextOptionsDefaultState','get','_updateResourceInContextState','DOCUMENT','isCurrentDocumentInConversation','fire','current-document','string','_createContextItemFromContent','updateCurrentDocument','_finishUploadOperation','addUrlToContext','delete','getPendingContextItems','ai-chat-source-resources-load-failed','URL','8664480pucSON','data','stack','isInContext','8ELuWmX','SELECTION','loadSourceResources','_conversationContextItems','ai-chat-resource-load-failed','getResources'];_0x565e=function(){return _0x29b085;};return _0x565e();}export class AIChatContext extends _0x991414(){[_0x52d18f(0x203)];[_0x52d18f(0x228)];[_0x52d18f(0x1df)];constructor({connector:_0x3a7f42,config:_0x2d2a37,ownerId:_0xfa571a}){const _0x2b0796=_0x52d18f;super(),this[_0x2b0796(0x203)]=_0x3a7f42,this[_0x2b0796(0x228)]=_0x2d2a37,this[_0x2b0796(0x1df)]=_0xfa571a;}[_0x52d18f(0x1f3)](){const _0x52e019=_0x52d18f;this[_0x52e019(0x260)]=new Map(),this[_0x52e019(0x245)]=new Map(),this[_0x52e019(0x21d)]=new Map(),this[_0x52e019(0x227)]=new Map(),this[_0x52e019(0x22e)]();}[_0x52d18f(0x23b)](){const _0x6f3671=_0x52d18f;return this[_0x6f3671(0x260)];}async[_0x52d18f(0x254)](_0x394817){const _0x13aad7=_0x52d18f,_0x2f4148=await this[_0x13aad7(0x236)](_0x394817);return this[_0x13aad7(0x201)](_0x2f4148),_0x13aad7(0x234)===_0x2f4148[_0x13aad7(0x1de)]&&this[_0x13aad7(0x1fd)](),_0x2f4148;}async[_0x52d18f(0x236)](_0x8ef278){const _0xddd98d=_0x52d18f;if(_0x8ef278[_0xddd98d(0x229)]===_0x24af84[_0xddd98d(0x231)]){const _0x47a949=await this[_0xddd98d(0x203)][_0xddd98d(0x222)](this[_0xddd98d(0x1df)],_0x8ef278['id'])[_0xddd98d(0x258)]();return{'id':_0xddd98d(0x234),'uiId':_0xddd98d(0x234),'label':_0xddd98d(0x253),'type':_0x8ef278[_0xddd98d(0x229)],'content':_0x47a949[_0xddd98d(0x20a)],'hidden':this[_0xddd98d(0x245)][_0xddd98d(0x25c)](_0xddd98d(0x234)),'version':_0x47a949[_0xddd98d(0x251)]?.[_0xddd98d(0x263)],'sessionId':_0x47a949[_0xddd98d(0x251)]?.[_0xddd98d(0x223)]};}return{'id':_0x8ef278['id'],'uiId':_0x8ef278['id'],'label':_0x8ef278[_0xddd98d(0x251)]?.[_0xddd98d(0x225)]||_0x8ef278[_0xddd98d(0x1db)]||_0x8ef278[_0xddd98d(0x1f4)]||_0x8ef278['id'],'type':_0x8ef278[_0xddd98d(0x229)],..._0x8ef278?.[_0xddd98d(0x251)]?.[_0xddd98d(0x20e)]?{'resourceId':_0x8ef278[_0xddd98d(0x251)]?.[_0xddd98d(0x20e)]}:{}};}[_0x52d18f(0x24e)](){const _0x3e8ba3=_0x52d18f;return new Map(this[_0x3e8ba3(0x245)]);}[_0x52d18f(0x252)](_0x7dd20a){const _0xfff085=_0x52d18f,_0x3641fc=this[_0xfff085(0x260)][_0xfff085(0x22f)](_0x7dd20a);_0x3641fc?.[_0xfff085(0x221)]||this[_0xfff085(0x1eb)](_0x7dd20a);}[_0x52d18f(0x1f1)](){const _0x55b2c4=_0x52d18f;if(0x0===this[_0x55b2c4(0x260)][_0x55b2c4(0x217)])return;for(const _0x12b789 of this[_0x55b2c4(0x260)][_0x55b2c4(0x212)]())this[_0x55b2c4(0x1eb)](_0x12b789[_0x55b2c4(0x1de)]);const _0x1f572e=this[_0x55b2c4(0x245)][_0x55b2c4(0x22f)](_0x55b2c4(0x234))||this[_0x55b2c4(0x260)][_0x55b2c4(0x22f)](_0x55b2c4(0x234));_0x1f572e&&this[_0x55b2c4(0x204)]({..._0x1f572e,'isReadOnly':!0x0,'hidden':!0x0});}[_0x52d18f(0x1f6)](_0x53133b){const _0x458135=_0x52d18f;for(const _0x34667f of _0x53133b[_0x458135(0x212)]())this[_0x458135(0x201)](_0x34667f);this[_0x458135(0x1f1)](),this[_0x458135(0x233)](_0x458135(0x1fe),{'contextItems':Array[_0x458135(0x1e9)](this[_0x458135(0x24e)]()[_0x458135(0x212)]())});}[_0x52d18f(0x21b)](){const _0x1c6bf9=_0x52d18f;return this[_0x1c6bf9(0x260)][_0x1c6bf9(0x25c)](_0x1c6bf9(0x234));}[_0x52d18f(0x211)](){const _0x538715=_0x52d18f;return this[_0x538715(0x260)][_0x538715(0x25c)](_0x538715(0x1ef));}[_0x52d18f(0x232)](){const _0x264bb9=_0x52d18f;return this[_0x264bb9(0x245)][_0x264bb9(0x25c)](_0x264bb9(0x234));}static[_0x52d18f(0x1ed)](_0x3cdb5e){const _0x209c05=_0x52d18f;return Array[_0x209c05(0x1e9)](_0x3cdb5e[_0x209c05(0x212)]())[_0x209c05(0x25d)](_0x406658=>this[_0x209c05(0x262)](_0x406658))[_0x209c05(0x25a)](_0x3eb2b1=>null!==_0x3eb2b1);}async[_0x52d18f(0x1e3)](_0x119234,_0x28fef5,_0x3a785e=_0x24af84[_0x52d18f(0x1e7)]){const _0x44e356=_0x52d18f,_0xb6ebad=_0x44e356(0x224)+_0x29edad();this[_0x44e356(0x257)](_0xb6ebad);try{await Promise[_0x44e356(0x25b)](_0x119234[_0x44e356(0x25d)](async _0x30a02a=>{const _0x35f772=_0x44e356,_0x2176ed=_0x35f772(0x1f9)+_0x29edad(),_0x2f9b63=_0x51f37a(_0x30a02a[_0x35f772(0x1db)]);try{this[_0x35f772(0x204)]({'type':_0x3a785e,'label':_0x28fef5?.[_0x35f772(0x225)]||_0x2f9b63,'uiId':_0x2176ed,'resourceId':_0x28fef5?.[_0x35f772(0x20e)]},!0x0);const _0x124d42=this[_0x35f772(0x203)][_0x35f772(0x206)](this[_0x35f772(0x1df)],_0x30a02a,_0x28fef5);this[_0x35f772(0x21d)][_0x35f772(0x210)](_0x2176ed,_0x124d42[_0x35f772(0x207)]);const {id:_0xe18858}=await _0x124d42[_0x35f772(0x24f)]();this[_0x35f772(0x21d)][_0x35f772(0x23a)](_0x2176ed),this[_0x35f772(0x267)]({'type':_0x3a785e,'id':_0xe18858,'label':_0x28fef5?.[_0x35f772(0x225)]||_0x2f9b63,'uiId':_0x2176ed,'resourceId':_0x28fef5?.[_0x35f772(0x20e)]},!0x1);}catch(_0x352373){this[_0x35f772(0x21d)][_0x35f772(0x23a)](_0x2176ed);if(!(_0x352373 instanceof _0x3dbe0e&&_0x352373[_0x35f772(0x215)][_0x35f772(0x24a)](_0x35f772(0x226)))){const _0x5f489d=_0x4a8de0[_0x35f772(0x22f)](_0x352373[_0x35f772(0x1ea)])||_0x35f772(0x220),_0x58d453=new _0x3dbe0e(_0x5f489d,null,{'fileName':_0x2f9b63,..._0x352373});_0x58d453[_0x35f772(0x240)]=_0x352373[_0x35f772(0x240)],this[_0x35f772(0x233)](_0x35f772(0x20d),{'error':_0x58d453});}this[_0x35f772(0x1eb)](_0x2176ed);}}));}finally{this[_0x44e356(0x238)](_0xb6ebad);}}[_0x52d18f(0x25f)](_0x5563f8){const _0x55c168=_0x52d18f;if(this[_0x55c168(0x21b)]())return;const _0x15016c={'type':_0x24af84[_0x55c168(0x231)],'uiId':_0x55c168(0x234),'label':_0x5563f8,'isReadOnly':this[_0x55c168(0x245)][_0x55c168(0x25c)](_0x55c168(0x234)),'hidden':this[_0x55c168(0x245)][_0x55c168(0x25c)](_0x55c168(0x234))};this[_0x55c168(0x204)](_0x15016c);}async[_0x52d18f(0x237)](_0x2240eb,_0x2460f0,_0x39d8e1,_0x254997){const _0x4e3796=_0x52d18f,_0x547e85=this[_0x4e3796(0x260)][_0x4e3796(0x22f)](_0x4e3796(0x234));if(_0x547e85&&_0x2240eb){_0x547e85[_0x4e3796(0x1ef)]=_0x254997?_0x254997[_0x4e3796(0x25d)](_0x556a24=>({'start':_0x556a24[_0x4e3796(0x266)],'end':_0x556a24[_0x4e3796(0x1fc)]})):[];try{if(_0x547e85[_0x4e3796(0x263)]===_0x2460f0)return;const {id:_0xd4ef93}=await this[_0x4e3796(0x203)][_0x4e3796(0x261)](this[_0x4e3796(0x1df)],_0x2240eb,{'version':_0x2460f0,'sessionId':_0x39d8e1})[_0x4e3796(0x24f)]();_0x547e85['id']=_0xd4ef93,_0x547e85[_0x4e3796(0x20a)]=_0x2240eb,_0x547e85[_0x4e3796(0x263)]=_0x2460f0,_0x547e85[_0x4e3796(0x223)]=_0x39d8e1;}catch(_0x1a2a6f){const _0x103e86=new _0x3dbe0e(_0x4e3796(0x1dc),null);_0x103e86[_0x4e3796(0x240)]=_0x1a2a6f[_0x4e3796(0x240)],this[_0x4e3796(0x233)](_0x4e3796(0x20d),{'error':_0x103e86});}}}[_0x52d18f(0x1f8)](_0x3eb614){const _0xd520a1=_0x52d18f;this[_0xd520a1(0x204)]({'type':_0x24af84[_0xd520a1(0x243)],'label':_0x3eb614,'uiId':_0xd520a1(0x1ef),'content':_0x3eb614});}[_0x52d18f(0x20f)](){const _0x545cd3=_0x52d18f;this[_0x545cd3(0x1eb)](_0x545cd3(0x1ef));}async[_0x52d18f(0x239)](_0x1e549f,_0x51b452){const _0x5bb1ba=_0x52d18f,_0x5bceef=_0x5bb1ba(0x22c)+_0x29edad();this[_0x5bb1ba(0x257)](_0x5bceef);const _0x58ce9a=_0x5bb1ba(0x22c)+_0x29edad();try{this[_0x5bb1ba(0x204)]({'type':_0x24af84[_0x5bb1ba(0x23d)],'label':_0x51b452?.[_0x5bb1ba(0x225)]||_0x1e549f,'uiId':_0x58ce9a,'resourceId':_0x51b452?.[_0x5bb1ba(0x20e)]},!0x0);const _0x560504=this[_0x5bb1ba(0x203)][_0x5bb1ba(0x205)](this[_0x5bb1ba(0x1df)],_0x1e549f,_0x51b452);this[_0x5bb1ba(0x21d)][_0x5bb1ba(0x210)](_0x58ce9a,_0x560504[_0x5bb1ba(0x207)]);const {id:_0x246249}=await _0x560504[_0x5bb1ba(0x24f)]();this[_0x5bb1ba(0x21d)][_0x5bb1ba(0x23a)](_0x58ce9a),this[_0x5bb1ba(0x267)]({'type':_0x24af84[_0x5bb1ba(0x23d)],'id':_0x246249,'label':_0x51b452?.[_0x5bb1ba(0x225)]||_0x1e549f,'uiId':_0x58ce9a,'resourceId':_0x51b452?.[_0x5bb1ba(0x20e)]},!0x1);}catch(_0x5c24c3){this[_0x5bb1ba(0x21d)][_0x5bb1ba(0x23a)](_0x58ce9a),(_0x5c24c3[_0x5bb1ba(0x215)][_0x5bb1ba(0x24a)](_0x5bb1ba(0x226))||this[_0x5bb1ba(0x233)](_0x5bb1ba(0x20d),{'error':new _0x3dbe0e(_0x5bb1ba(0x20c),this,{'url':_0x1e549f,'originalError':_0x5c24c3}),'url':_0x1e549f}),this[_0x5bb1ba(0x1eb)](_0x58ce9a));}finally{this[_0x5bb1ba(0x238)](_0x5bceef);}}async[_0x52d18f(0x244)](_0x4ac5cb,_0x149813,_0x3358a4){const _0x71a3d9=_0x52d18f,_0x233168=this[_0x71a3d9(0x1e6)][_0x71a3d9(0x264)][_0x71a3d9(0x1ec)](_0x476f6d=>_0x476f6d['id']===_0x4ac5cb);if(!_0x233168)return this[_0x71a3d9(0x233)](_0x71a3d9(0x20d),{'error':new _0x3dbe0e(_0x71a3d9(0x202),this,{'sourceId':_0x4ac5cb}),'sourceId':_0x4ac5cb}),[];try{const _0x34bedb=(await _0x233168[_0x71a3d9(0x247)](_0x149813))[_0x71a3d9(0x25d)](_0x300453=>{const _0x1a5f0b=_0x71a3d9,_0x407103=this[_0x1a5f0b(0x21f)](_0x300453['id']);return{..._0x300453,'isInContext':_0x407103};});return _0x233168[_0x71a3d9(0x209)]=_0x34bedb,this[_0x71a3d9(0x233)](_0x71a3d9(0x24d),{'sourceId':_0x4ac5cb,'source':_0x233168,'resources':_0x34bedb,'uid':_0x3358a4}),_0x34bedb;}catch(_0x7eabe5){return this[_0x71a3d9(0x233)](_0x71a3d9(0x20d),{'error':new _0x3dbe0e(_0x71a3d9(0x23c),this,{'sourceId':_0x4ac5cb,'originalError':_0x7eabe5}),'sourceId':_0x4ac5cb,'sourceLabel':_0x233168[_0x71a3d9(0x225)]}),[];}}async[_0x52d18f(0x25e)](_0x5a3c54,_0x11d782){const _0x2cf41c=_0x52d18f;if(this[_0x2cf41c(0x21f)](_0x11d782['id']))return;let _0x659bd=_0x11d782[_0x2cf41c(0x23f)];if(!_0x659bd&&_0x5a3c54[_0x2cf41c(0x255)])try{_0x659bd=await _0x5a3c54[_0x2cf41c(0x255)](_0x11d782['id']);}catch(_0x4a0138){return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x246),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'originalError':_0x4a0138}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});}if(_0x659bd)switch(_0x11d782[_0x2cf41c(0x229)]){case _0x24af84[_0x2cf41c(0x23d)]:if(_0x2cf41c(0x235)!=typeof _0x659bd)return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e4),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'expectedType':_0x2cf41c(0x235),'actualType':typeof _0x659bd}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});await this[_0x2cf41c(0x239)](_0x659bd,{'label':_0x11d782[_0x2cf41c(0x225)],'resourceId':_0x11d782['id']});break;case _0x24af84[_0x2cf41c(0x1e7)]:if(!(_0x659bd instanceof File))return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e4),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'expectedType':_0x2cf41c(0x21e),'actualType':typeof _0x659bd}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});await this[_0x2cf41c(0x1e3)]([_0x659bd],{'label':_0x11d782[_0x2cf41c(0x225)],'resourceId':_0x11d782['id']});break;case _0x24af84[_0x2cf41c(0x1f5)]:if(_0x2cf41c(0x219)!=typeof _0x659bd||!(_0x2cf41c(0x20a)in _0x659bd)||!(_0x2cf41c(0x229)in _0x659bd))return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e4),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'expectedType':_0x2cf41c(0x256),'actualType':typeof _0x659bd}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});_0x659bd=AIChatContext[_0x2cf41c(0x208)](_0x659bd,_0x11d782[_0x2cf41c(0x225)]),await this[_0x2cf41c(0x1e3)]([_0x659bd],{'label':_0x11d782[_0x2cf41c(0x225)],'resourceId':_0x11d782['id']},_0x24af84[_0x2cf41c(0x1f5)]);break;default:this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e8),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'resourceType':_0x11d782[_0x2cf41c(0x229)]}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});}else this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x214),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});}static[_0x52d18f(0x208)](_0x4c383c,_0x5833ac){const _0x3aba1f=_0x52d18f;switch(_0x4c383c[_0x3aba1f(0x229)]){case _0x470c61[_0x3aba1f(0x250)]:return new File([_0x4c383c[_0x3aba1f(0x20a)]],_0x5833ac,{'type':_0x3aba1f(0x21c)});case _0x470c61[_0x3aba1f(0x268)]:return new File([_0x4c383c[_0x3aba1f(0x20a)]],_0x5833ac,{'type':_0x3aba1f(0x1e0)});default:return new File([_0x4c383c[_0x3aba1f(0x20a)]],_0x5833ac,{'type':_0x3aba1f(0x22a)});}}static[_0x52d18f(0x262)](_0x208708){const _0x1923d6=_0x52d18f;switch(_0x208708[_0x1923d6(0x229)]){case _0x24af84[_0x1923d6(0x1e7)]:return{'type':_0x24af84[_0x1923d6(0x1e7)],'id':_0x208708['id']};case _0x24af84[_0x1923d6(0x23d)]:return{'type':_0x24af84[_0x1923d6(0x23d)],'id':_0x208708['id']};case _0x24af84[_0x1923d6(0x231)]:return{'type':_0x24af84[_0x1923d6(0x231)],'id':_0x208708['id'],..._0x208708[_0x1923d6(0x1ef)]?.[_0x1923d6(0x20b)]&&{'selection':_0x208708[_0x1923d6(0x1ef)]}};case _0x24af84[_0x1923d6(0x1f5)]:return{'type':_0x24af84[_0x1923d6(0x1e7)],'id':_0x208708['id']};default:return null;}}[_0x52d18f(0x204)](_0xbd68aa,_0x2d0bfc=!0x1){const _0x268685=_0x52d18f;if(this[_0x268685(0x260)][_0x268685(0x210)](_0xbd68aa[_0x268685(0x1de)],_0xbd68aa),_0xbd68aa[_0x268685(0x216)]||this[_0x268685(0x233)](_0x268685(0x1e5),{'contextItem':_0xbd68aa,'isLoading':_0x2d0bfc}),_0x268685(0x234)===_0xbd68aa[_0x268685(0x1de)]&&this[_0x268685(0x1fd)](),_0xbd68aa[_0x268685(0x20e)]){const _0xd8e32d=this[_0x268685(0x22d)](_0xbd68aa[_0x268685(0x20e)]);_0xd8e32d&&_0xd8e32d[_0x268685(0x200)](_0xd6850=>{const _0x480cc6=_0x268685;this[_0x480cc6(0x230)](_0xd6850,_0xbd68aa[_0x480cc6(0x20e)],!0x0);});}}[_0x52d18f(0x1eb)](_0x5877c0){const _0x34f397=_0x52d18f,_0x1db11b=this[_0x34f397(0x260)][_0x34f397(0x22f)](_0x5877c0),_0x3b8430=this[_0x34f397(0x21d)][_0x34f397(0x22f)](_0x5877c0);if(_0x3b8430&&(_0x3b8430[_0x34f397(0x249)](),this[_0x34f397(0x21d)][_0x34f397(0x23a)](_0x5877c0)),_0x1db11b?.[_0x34f397(0x20e)]){const _0x168608=this[_0x34f397(0x22d)](_0x1db11b[_0x34f397(0x20e)]);_0x168608&&_0x168608[_0x34f397(0x200)](_0x4e8b6b=>{const _0x365771=_0x34f397;this[_0x365771(0x230)](_0x4e8b6b,_0x1db11b[_0x365771(0x20e)],!0x1);});}this[_0x34f397(0x260)][_0x34f397(0x23a)](_0x5877c0),this[_0x34f397(0x233)](_0x34f397(0x1f0),{'uiId':_0x5877c0,'type':_0x1db11b?.[_0x34f397(0x229)]}),_0x34f397(0x234)===_0x5877c0&&this[_0x34f397(0x1fd)]();}[_0x52d18f(0x267)](_0x4931e6,_0x19309d){const _0x37e78b=_0x52d18f;if(this[_0x37e78b(0x260)][_0x37e78b(0x25c)](_0x4931e6[_0x37e78b(0x1de)])&&(this[_0x37e78b(0x260)][_0x37e78b(0x210)](_0x4931e6[_0x37e78b(0x1de)],_0x4931e6),this[_0x37e78b(0x233)](_0x37e78b(0x213),{'contextItem':_0x4931e6,'isLoading':_0x19309d}),_0x4931e6[_0x37e78b(0x20e)])){const _0x4f6be5=this[_0x37e78b(0x22d)](_0x4931e6[_0x37e78b(0x20e)]);_0x4f6be5&&_0x4f6be5[_0x37e78b(0x200)](_0x529105=>{const _0x3c6c28=_0x37e78b;this[_0x3c6c28(0x230)](_0x529105,_0x4931e6[_0x3c6c28(0x20e)],!0x0);});}}[_0x52d18f(0x201)](_0x447224){const _0x22847a=_0x52d18f;this[_0x22847a(0x245)][_0x22847a(0x210)](_0x447224[_0x22847a(0x1de)],_0x447224);}[_0x52d18f(0x22e)](){const _0x492959=_0x52d18f;this[_0x492959(0x1e6)]={'document':{'enabled':!0x1!==this[_0x492959(0x228)]?.[_0x492959(0x218)]?.[_0x492959(0x1ff)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x492959(0x228)]?.[_0x492959(0x1dd)]?.[_0x492959(0x1ff)]},'files':{'enabled':!0x1!==this[_0x492959(0x228)]?.[_0x492959(0x1fa)]?.[_0x492959(0x1ff)]},'sources':this[_0x492959(0x24b)]()},this[_0x492959(0x233)](_0x492959(0x1ee),{'options':this[_0x492959(0x1e6)]});}[_0x52d18f(0x24b)](){const _0x4fbf5a=_0x52d18f;return this[_0x4fbf5a(0x228)]?.[_0x4fbf5a(0x264)]?.[_0x4fbf5a(0x25d)](_0x409d03=>({..._0x409d03,'resources':[]}))??[];}[_0x52d18f(0x1fd)](){const _0x130fb9=_0x52d18f,_0xe2456d=this[_0x130fb9(0x21b)]()||this[_0x130fb9(0x232)]();this[_0x130fb9(0x1e6)][_0x130fb9(0x218)][_0x130fb9(0x248)]=_0xe2456d,this[_0x130fb9(0x233)](_0x130fb9(0x1ee),{'options':this[_0x130fb9(0x1e6)]});}[_0x52d18f(0x21f)](_0x4b338c){const _0x3f256b=_0x52d18f;for(const _0x3cbc8b of this[_0x3f256b(0x260)][_0x3f256b(0x212)]())if(_0x3cbc8b[_0x3f256b(0x20e)]===_0x4b338c)return!0x0;for(const _0x211597 of this[_0x3f256b(0x245)][_0x3f256b(0x212)]())if(_0x211597[_0x3f256b(0x20e)]===_0x4b338c)return!0x0;return!0x1;}[_0x52d18f(0x22d)](_0x13684c){const _0xd6dd76=_0x52d18f,_0x2f48d9=[];for(const _0x25f421 of this[_0xd6dd76(0x1e6)][_0xd6dd76(0x264)]){_0x25f421[_0xd6dd76(0x209)][_0xd6dd76(0x1ec)](_0x3db8bf=>_0x3db8bf['id']===_0x13684c)&&_0x2f48d9[_0xd6dd76(0x1e2)](_0x25f421['id']);}return 0x0===_0x2f48d9[_0xd6dd76(0x20b)]?null:_0x2f48d9;}[_0x52d18f(0x230)](_0x4c1679,_0x4e2a0a,_0x3d2bc9){const _0x2f6a3f=_0x52d18f,_0x1533a4=this[_0x2f6a3f(0x1e6)][_0x2f6a3f(0x264)][_0x2f6a3f(0x1ec)](_0x147ed3=>_0x147ed3['id']===_0x4c1679);if(!_0x1533a4)return;const _0x944b59=_0x1533a4[_0x2f6a3f(0x209)][_0x2f6a3f(0x1ec)](_0x2dabc2=>_0x2dabc2['id']===_0x4e2a0a);_0x944b59&&(_0x944b59[_0x2f6a3f(0x241)]=_0x3d2bc9,this[_0x2f6a3f(0x233)](_0x2f6a3f(0x259),{'sourceId':_0x4c1679,'resourceId':_0x4e2a0a,'isInContext':_0x3d2bc9}));}[_0x52d18f(0x257)](_0x57da27){const _0x27ae57=_0x52d18f;this[_0x27ae57(0x227)][_0x27ae57(0x210)](_0x57da27,!0x0),this[_0x27ae57(0x227)][_0x27ae57(0x217)]&&this[_0x27ae57(0x233)](_0x27ae57(0x1e1),{'isUploadInProgress':!0x0});}[_0x52d18f(0x238)](_0x22c95a){const _0x5554a6=_0x52d18f;this[_0x5554a6(0x227)][_0x5554a6(0x23a)](_0x22c95a),0x0===this[_0x5554a6(0x227)][_0x5554a6(0x217)]&&this[_0x5554a6(0x233)](_0x5554a6(0x1e1),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
const _0x112097=_0xd856;(function(_0x543351,_0x16b8c7){const _0xe522cd=_0xd856,_0x4e1b38=_0x543351();while(!![]){try{const _0x178e5f=-parseInt(_0xe522cd(0x24a))/0x1+-parseInt(_0xe522cd(0x23c))/0x2+parseInt(_0xe522cd(0x255))/0x3*(-parseInt(_0xe522cd(0x1e5))/0x4)+-parseInt(_0xe522cd(0x1e7))/0x5+-parseInt(_0xe522cd(0x259))/0x6*(-parseInt(_0xe522cd(0x211))/0x7)+-parseInt(_0xe522cd(0x25d))/0x8+-parseInt(_0xe522cd(0x1f0))/0x9*(-parseInt(_0xe522cd(0x220))/0xa);if(_0x178e5f===_0x16b8c7)break;else _0x4e1b38['push'](_0x4e1b38['shift']());}catch(_0x28bb13){_0x4e1b38['push'](_0x4e1b38['shift']());}}}(_0x227f,0x2a054));function _0x227f(){const _0x5c6946=['isInContext','filter','size','enabled','getResources','end','text/markdown','addCurrentDocumentToContext','_mapContextItemToRequestData','type','_ownerId','data','6737930ydbfPG','addUrlToContext','files-','object','_finishUploadOperation','HTML','text/plain','sourceResourcesLoaded','clearPendingContextItems','document','_setAddContextOptionsDefaultState','contextItemLoadingEnded','addFilesToContext','selection','resources','string','map','ai-request-aborted','ai-chat-source-resources-load-failed','isCurrentDocumentInConversation','SELECTION','_ongoingUploads','getDocument','ai-chat-url-upload-failed','mapContextItemsToRequestData','ai-chat-context-unsupported-type','ai-chat-document-upload-failed','_conversationContextItems','236602LyqnvJ','name','sources','isReadOnly','sessionId','current-document','find','file-','label','contextItemAdded','MARKDOWN','forEach','length','contextSent','337972qmGqYe','fetchDocument','_addContextItem','code','getId','loadSourceResources','uiId','message','start','contextItemRemoved','has','6osSLvF','push','removeSelectionFromContext','_pendingContextItems','6wVnjUo','_updateResourceInContextState','_ongoingUploadOperations','url','480208rwJBcL','getPendingContextItems','ai-chat-resource-no-data','set','from','addResourceToContext','updateCurrentDocument','removeFromContext','DOCUMENT','content','ai-chat-file-upload-failed','abort','ai-chat-source-not-found','urls','_toggleAddCurrentDocumentOptionVisibility','_convertTextResourceToFile','getData','_connector','fire','resourceId','error','ai-chat-context-invalid-data','_getCustomSourcesInitialState','462732SftFqZ','addSelectionToContext','343925zrDelx','values','resourceStateChanged','getSentContextItems','_findSourceIdsByResourceId','delete','Current\x20document','all','_removeContextItem','9OOTDRh','addToConversationContext','attributes','get','uploadUrl','populateFromMessage','isSelectionInContext','isCurrentDocumentInContext','uploadProgressChanged','url-','_startUploadOperation','TEXT','files','startsWith','URL','init','uploadDocument','stack','_addToConversationContextItem','hidden','File','_addContextOptionsState','FILE','isHidden','_finishContextItemLoading','_isResourceInContext','_createContextItemFromContent','_config','text/html','version','object\x20with\x20content\x20and\x20type\x20properties','ai-chat-resource-load-failed','uploadFile','2203411gOBRjy','addContextOptionsChanged','abortController'];_0x227f=function(){return _0x5c6946;};return _0x227f();}import{CKEditorError as _0x3c7f74,ObservableMixin as _0x5a1d5f,uid as _0xe5ba27}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x4c0062,AIContextTextResourceType as _0x26dfe0}from'../../aicore/model/aicontext.js';function _0xd856(_0x424023,_0x12cdb4){const _0x227f50=_0x227f();return _0xd856=function(_0xd8567b,_0x35a040){_0xd8567b=_0xd8567b-0x1e3;let _0x81fc60=_0x227f50[_0xd8567b];return _0x81fc60;},_0xd856(_0x424023,_0x12cdb4);}import{escape as _0x142173}from'es-toolkit/compat';import{errorsMap as _0x27310e}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x112097(0x245),_0x112097(0x253),_0x112097(0x22b),_0x112097(0x249),_0x112097(0x271),_0x112097(0x212),_0x112097(0x227),_0x112097(0x1e9),_0x112097(0x1f8)];export class AIChatContext extends _0x5a1d5f(){[_0x112097(0x26e)];[_0x112097(0x20b)];[_0x112097(0x21e)];constructor({connector:_0x168d90,config:_0x3dfad3,ownerId:_0x21a7fd}){const _0x183707=_0x112097;super(),this[_0x183707(0x26e)]=_0x168d90,this[_0x183707(0x20b)]=_0x3dfad3,this[_0x183707(0x21e)]=_0x21a7fd;}[_0x112097(0x1ff)](){const _0x2d1184=_0x112097;this[_0x2d1184(0x258)]=new Map(),this[_0x2d1184(0x23b)]=new Map(),this[_0x2d1184(0x235)]=new Map(),this[_0x2d1184(0x25b)]=new Map(),this[_0x2d1184(0x22a)]();}[_0x112097(0x25e)](){const _0x387097=_0x112097;return this[_0x387097(0x258)];}async[_0x112097(0x1f5)](_0x3b5777){const _0x40b39f=_0x112097,_0x4dfbde=await this[_0x40b39f(0x20a)](_0x3b5777);return this[_0x40b39f(0x202)](_0x4dfbde),_0x40b39f(0x241)===_0x4dfbde[_0x40b39f(0x250)]&&this[_0x40b39f(0x26b)](),_0x4dfbde;}async[_0x112097(0x20a)](_0x382c14){const _0x122ecb=_0x112097;if(_0x382c14[_0x122ecb(0x21d)]===_0x4c0062[_0x122ecb(0x265)]){const _0x401d54=await this[_0x122ecb(0x26e)][_0x122ecb(0x24b)](this[_0x122ecb(0x21e)],_0x382c14['id'])[_0x122ecb(0x236)]();return{'id':_0x122ecb(0x241),'uiId':_0x122ecb(0x241),'label':_0x122ecb(0x1ed),'type':_0x382c14[_0x122ecb(0x21d)],'content':_0x401d54[_0x122ecb(0x266)],'hidden':this[_0x122ecb(0x23b)][_0x122ecb(0x254)](_0x122ecb(0x241)),'version':_0x401d54[_0x122ecb(0x1f2)]?.[_0x122ecb(0x20d)],'sessionId':_0x401d54[_0x122ecb(0x1f2)]?.[_0x122ecb(0x240)]};}return{'id':_0x382c14['id'],'uiId':_0x382c14['id'],'label':_0x382c14[_0x122ecb(0x1f2)]?.[_0x122ecb(0x244)]||_0x382c14[_0x122ecb(0x23d)]||_0x382c14[_0x122ecb(0x25c)]||_0x382c14['id'],'type':_0x382c14[_0x122ecb(0x21d)],..._0x382c14?.[_0x122ecb(0x1f2)]?.[_0x122ecb(0x270)]?{'resourceId':_0x382c14[_0x122ecb(0x1f2)]?.[_0x122ecb(0x270)]}:{}};}[_0x112097(0x1ea)](){const _0xf0a629=_0x112097;return new Map(this[_0xf0a629(0x23b)]);}[_0x112097(0x264)](_0x27af91){const _0x4ebe88=_0x112097,_0x559c69=this[_0x4ebe88(0x258)][_0x4ebe88(0x1f3)](_0x27af91);_0x559c69?.[_0x4ebe88(0x23f)]||this[_0x4ebe88(0x1ef)](_0x27af91);}[_0x112097(0x228)](){const _0x1746aa=_0x112097;if(0x0===this[_0x1746aa(0x258)][_0x1746aa(0x216)])return;for(const _0x5c32db of this[_0x1746aa(0x258)][_0x1746aa(0x1e8)]())this[_0x1746aa(0x1ef)](_0x5c32db[_0x1746aa(0x250)]);const _0xeac5d6=this[_0x1746aa(0x23b)][_0x1746aa(0x1f3)](_0x1746aa(0x241))||this[_0x1746aa(0x258)][_0x1746aa(0x1f3)](_0x1746aa(0x241));_0xeac5d6&&this[_0x1746aa(0x24c)]({..._0xeac5d6,'isReadOnly':!0x0,'hidden':!0x0});}[_0x112097(0x1f1)](_0x1bd276){const _0x1768dd=_0x112097;for(const _0x4b94fa of _0x1bd276[_0x1768dd(0x1e8)]())this[_0x1768dd(0x202)](_0x4b94fa);this[_0x1768dd(0x228)](),this[_0x1768dd(0x26f)](_0x1768dd(0x249),{'contextItems':Array[_0x1768dd(0x261)](this[_0x1768dd(0x1ea)]()[_0x1768dd(0x1e8)]())});}[_0x112097(0x1f7)](){const _0x4525=_0x112097;return this[_0x4525(0x258)][_0x4525(0x254)](_0x4525(0x241));}[_0x112097(0x1f6)](){const _0x5cb7d1=_0x112097;return this[_0x5cb7d1(0x258)][_0x5cb7d1(0x254)](_0x5cb7d1(0x22d));}[_0x112097(0x233)](){const _0x5f41a6=_0x112097;return this[_0x5f41a6(0x23b)][_0x5f41a6(0x254)](_0x5f41a6(0x241));}static[_0x112097(0x238)](_0x13cf1e){const _0x1afe64=_0x112097;return Array[_0x1afe64(0x261)](_0x13cf1e[_0x1afe64(0x1e8)]())[_0x1afe64(0x230)](_0x3c5dab=>this[_0x1afe64(0x21c)](_0x3c5dab))[_0x1afe64(0x215)](_0x5e6264=>null!==_0x5e6264);}async[_0x112097(0x22c)](_0x24fe98,_0xd0e758,_0x38ef35=_0x4c0062[_0x112097(0x206)]){const _0x32a137=_0x112097,_0x545404=_0x32a137(0x222)+_0xe5ba27();this[_0x32a137(0x1fa)](_0x545404);try{await Promise[_0x32a137(0x1ee)](_0x24fe98[_0x32a137(0x230)](async _0x3b9f32=>{const _0x50b229=_0x32a137,_0x8f5615=_0x50b229(0x243)+_0xe5ba27(),_0x1e1288=_0x142173(_0x3b9f32[_0x50b229(0x23d)]);try{this[_0x50b229(0x24c)]({'type':_0x38ef35,'label':_0xd0e758?.[_0x50b229(0x244)]||_0x1e1288,'uiId':_0x8f5615,'resourceId':_0xd0e758?.[_0x50b229(0x270)]},!0x0);const _0x3e6404=this[_0x50b229(0x26e)][_0x50b229(0x210)](this[_0x50b229(0x21e)],_0x3b9f32,_0xd0e758);this[_0x50b229(0x235)][_0x50b229(0x260)](_0x8f5615,_0x3e6404[_0x50b229(0x213)]);const {id:_0x120dab}=await _0x3e6404[_0x50b229(0x24e)]();this[_0x50b229(0x235)][_0x50b229(0x1ec)](_0x8f5615),this[_0x50b229(0x208)]({'type':_0x38ef35,'id':_0x120dab,'label':_0xd0e758?.[_0x50b229(0x244)]||_0x1e1288,'uiId':_0x8f5615,'resourceId':_0xd0e758?.[_0x50b229(0x270)]},!0x1);}catch(_0x8d22a4){this[_0x50b229(0x235)][_0x50b229(0x1ec)](_0x8f5615);if(!(_0x8d22a4 instanceof _0x3c7f74&&_0x8d22a4[_0x50b229(0x251)][_0x50b229(0x1fd)](_0x50b229(0x231)))){const _0x53c5c3=_0x27310e[_0x50b229(0x1f3)](_0x8d22a4[_0x50b229(0x24d)])||_0x50b229(0x267),_0x24158d=new _0x3c7f74(_0x53c5c3,null,{'fileName':_0x1e1288,..._0x8d22a4});_0x24158d[_0x50b229(0x201)]=_0x8d22a4[_0x50b229(0x201)],this[_0x50b229(0x26f)](_0x50b229(0x271),{'error':_0x24158d});}this[_0x50b229(0x1ef)](_0x8f5615);}}));}finally{this[_0x32a137(0x224)](_0x545404);}}[_0x112097(0x21b)](_0x2bbec5){const _0x5baaef=_0x112097;if(this[_0x5baaef(0x1f7)]())return;const _0x11a226={'type':_0x4c0062[_0x5baaef(0x265)],'uiId':_0x5baaef(0x241),'label':_0x2bbec5,'isReadOnly':this[_0x5baaef(0x23b)][_0x5baaef(0x254)](_0x5baaef(0x241)),'hidden':this[_0x5baaef(0x23b)][_0x5baaef(0x254)](_0x5baaef(0x241))};this[_0x5baaef(0x24c)](_0x11a226);}async[_0x112097(0x263)](_0x460c95,_0x1cc3f0,_0x104dad,_0x36267c){const _0x2e9659=_0x112097,_0x517637=this[_0x2e9659(0x258)][_0x2e9659(0x1f3)](_0x2e9659(0x241));if(_0x517637&&_0x460c95){_0x517637[_0x2e9659(0x22d)]=_0x36267c?_0x36267c[_0x2e9659(0x230)](_0x3e929b=>({'start':_0x3e929b[_0x2e9659(0x252)],'end':_0x3e929b[_0x2e9659(0x219)]})):[];try{if(_0x517637[_0x2e9659(0x20d)]===_0x1cc3f0)return;const {id:_0x653a6e}=await this[_0x2e9659(0x26e)][_0x2e9659(0x200)](this[_0x2e9659(0x21e)],_0x460c95,{'version':_0x1cc3f0,'sessionId':_0x104dad})[_0x2e9659(0x24e)]();_0x517637['id']=_0x653a6e,_0x517637[_0x2e9659(0x266)]=_0x460c95,_0x517637[_0x2e9659(0x20d)]=_0x1cc3f0,_0x517637[_0x2e9659(0x240)]=_0x104dad;}catch(_0x1ff481){const _0x2098a3=new _0x3c7f74(_0x2e9659(0x23a),null);_0x2098a3[_0x2e9659(0x201)]=_0x1ff481[_0x2e9659(0x201)],this[_0x2e9659(0x26f)](_0x2e9659(0x271),{'error':_0x2098a3});}}}[_0x112097(0x1e6)](_0x4636b0){const _0x117175=_0x112097;this[_0x117175(0x24c)]({'type':_0x4c0062[_0x117175(0x234)],'label':_0x4636b0,'uiId':_0x117175(0x22d),'content':_0x4636b0});}[_0x112097(0x257)](){const _0x18f6be=_0x112097;this[_0x18f6be(0x1ef)](_0x18f6be(0x22d));}async[_0x112097(0x221)](_0x30ab5c,_0x809454){const _0x2f80b2=_0x112097,_0x1055e0=_0x2f80b2(0x1f9)+_0xe5ba27();this[_0x2f80b2(0x1fa)](_0x1055e0);const _0x2386e5=_0x2f80b2(0x1f9)+_0xe5ba27();try{this[_0x2f80b2(0x24c)]({'type':_0x4c0062[_0x2f80b2(0x1fe)],'label':_0x809454?.[_0x2f80b2(0x244)]||_0x30ab5c,'uiId':_0x2386e5,'resourceId':_0x809454?.[_0x2f80b2(0x270)]},!0x0);const _0xcecb82=this[_0x2f80b2(0x26e)][_0x2f80b2(0x1f4)](this[_0x2f80b2(0x21e)],_0x30ab5c,_0x809454);this[_0x2f80b2(0x235)][_0x2f80b2(0x260)](_0x2386e5,_0xcecb82[_0x2f80b2(0x213)]);const {id:_0x1037c7}=await _0xcecb82[_0x2f80b2(0x24e)]();this[_0x2f80b2(0x235)][_0x2f80b2(0x1ec)](_0x2386e5),this[_0x2f80b2(0x208)]({'type':_0x4c0062[_0x2f80b2(0x1fe)],'id':_0x1037c7,'label':_0x809454?.[_0x2f80b2(0x244)]||_0x30ab5c,'uiId':_0x2386e5,'resourceId':_0x809454?.[_0x2f80b2(0x270)]},!0x1);}catch(_0x2799dc){this[_0x2f80b2(0x235)][_0x2f80b2(0x1ec)](_0x2386e5),(_0x2799dc[_0x2f80b2(0x251)][_0x2f80b2(0x1fd)](_0x2f80b2(0x231))||this[_0x2f80b2(0x26f)](_0x2f80b2(0x271),{'error':new _0x3c7f74(_0x2f80b2(0x237),this,{'url':_0x30ab5c,'originalError':_0x2799dc}),'url':_0x30ab5c}),this[_0x2f80b2(0x1ef)](_0x2386e5));}finally{this[_0x2f80b2(0x224)](_0x1055e0);}}async[_0x112097(0x24f)](_0x13f825,_0x2934a1,_0x4eab0d){const _0x4be432=_0x112097,_0x458fb8=this[_0x4be432(0x205)][_0x4be432(0x23e)][_0x4be432(0x242)](_0x3ce996=>_0x3ce996['id']===_0x13f825);if(!_0x458fb8)return this[_0x4be432(0x26f)](_0x4be432(0x271),{'error':new _0x3c7f74(_0x4be432(0x269),this,{'sourceId':_0x13f825}),'sourceId':_0x13f825}),[];try{const _0x45469a=(await _0x458fb8[_0x4be432(0x218)](_0x2934a1))[_0x4be432(0x230)](_0x5689fa=>{const _0x5ce90f=_0x4be432,_0x3adbda=this[_0x5ce90f(0x209)](_0x5689fa['id']);return{..._0x5689fa,'isInContext':_0x3adbda};});return _0x458fb8[_0x4be432(0x22e)]=_0x45469a,this[_0x4be432(0x26f)](_0x4be432(0x227),{'sourceId':_0x13f825,'source':_0x458fb8,'resources':_0x45469a,'uid':_0x4eab0d}),_0x45469a;}catch(_0x49310d){return this[_0x4be432(0x26f)](_0x4be432(0x271),{'error':new _0x3c7f74(_0x4be432(0x232),this,{'sourceId':_0x13f825,'originalError':_0x49310d}),'sourceId':_0x13f825,'sourceLabel':_0x458fb8[_0x4be432(0x244)]}),[];}}async[_0x112097(0x262)](_0x1176fd,_0x4c77fa){const _0xe05189=_0x112097;if(this[_0xe05189(0x209)](_0x4c77fa['id']))return;let _0x41f896=_0x4c77fa[_0xe05189(0x21f)];if(!_0x41f896&&_0x1176fd[_0xe05189(0x26d)])try{_0x41f896=await _0x1176fd[_0xe05189(0x26d)](_0x4c77fa['id']);}catch(_0x13b766){return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x20f),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'originalError':_0x13b766}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});}if(_0x41f896)switch(_0x4c77fa[_0xe05189(0x21d)]){case _0x4c0062[_0xe05189(0x1fe)]:if(_0xe05189(0x22f)!=typeof _0x41f896)return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x1e3),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'expectedType':_0xe05189(0x22f),'actualType':typeof _0x41f896}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});await this[_0xe05189(0x221)](_0x41f896,{'label':_0x4c77fa[_0xe05189(0x244)],'resourceId':_0x4c77fa['id']});break;case _0x4c0062[_0xe05189(0x206)]:if(!(_0x41f896 instanceof File))return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x1e3),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'expectedType':_0xe05189(0x204),'actualType':typeof _0x41f896}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});await this[_0xe05189(0x22c)]([_0x41f896],{'label':_0x4c77fa[_0xe05189(0x244)],'resourceId':_0x4c77fa['id']});break;case _0x4c0062[_0xe05189(0x1fb)]:if(_0xe05189(0x223)!=typeof _0x41f896||!(_0xe05189(0x266)in _0x41f896)||!(_0xe05189(0x21d)in _0x41f896))return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x1e3),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'expectedType':_0xe05189(0x20e),'actualType':typeof _0x41f896}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});_0x41f896=AIChatContext[_0xe05189(0x26c)](_0x41f896,_0x4c77fa[_0xe05189(0x244)]),await this[_0xe05189(0x22c)]([_0x41f896],{'label':_0x4c77fa[_0xe05189(0x244)],'resourceId':_0x4c77fa['id']},_0x4c0062[_0xe05189(0x1fb)]);break;default:this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x239),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'resourceType':_0x4c77fa[_0xe05189(0x21d)]}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});}else this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x25f),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});}static[_0x112097(0x26c)](_0xb7a7d4,_0x4221c4){const _0x4510c9=_0x112097;switch(_0xb7a7d4[_0x4510c9(0x21d)]){case _0x26dfe0[_0x4510c9(0x246)]:return new File([_0xb7a7d4[_0x4510c9(0x266)]],_0x4221c4,{'type':_0x4510c9(0x21a)});case _0x26dfe0[_0x4510c9(0x225)]:return new File([_0xb7a7d4[_0x4510c9(0x266)]],_0x4221c4,{'type':_0x4510c9(0x20c)});default:return new File([_0xb7a7d4[_0x4510c9(0x266)]],_0x4221c4,{'type':_0x4510c9(0x226)});}}static[_0x112097(0x21c)](_0x48cf5d){const _0x4afb58=_0x112097;switch(_0x48cf5d[_0x4afb58(0x21d)]){case _0x4c0062[_0x4afb58(0x206)]:return{'type':_0x4c0062[_0x4afb58(0x206)],'id':_0x48cf5d['id']};case _0x4c0062[_0x4afb58(0x1fe)]:return{'type':_0x4c0062[_0x4afb58(0x1fe)],'id':_0x48cf5d['id']};case _0x4c0062[_0x4afb58(0x265)]:return{'type':_0x4c0062[_0x4afb58(0x265)],'id':_0x48cf5d['id'],..._0x48cf5d[_0x4afb58(0x22d)]?.[_0x4afb58(0x248)]&&{'selection':_0x48cf5d[_0x4afb58(0x22d)]}};case _0x4c0062[_0x4afb58(0x1fb)]:return{'type':_0x4c0062[_0x4afb58(0x206)],'id':_0x48cf5d['id']};default:return null;}}[_0x112097(0x24c)](_0x478270,_0x23d35d=!0x1){const _0xe946b6=_0x112097;if(this[_0xe946b6(0x258)][_0xe946b6(0x260)](_0x478270[_0xe946b6(0x250)],_0x478270),_0x478270[_0xe946b6(0x203)]||this[_0xe946b6(0x26f)](_0xe946b6(0x245),{'contextItem':_0x478270,'isLoading':_0x23d35d}),_0xe946b6(0x241)===_0x478270[_0xe946b6(0x250)]&&this[_0xe946b6(0x26b)](),_0x478270[_0xe946b6(0x270)]){const _0xdc7b19=this[_0xe946b6(0x1eb)](_0x478270[_0xe946b6(0x270)]);_0xdc7b19&&_0xdc7b19[_0xe946b6(0x247)](_0x3a5176=>{const _0x4208bb=_0xe946b6;this[_0x4208bb(0x25a)](_0x3a5176,_0x478270[_0x4208bb(0x270)],!0x0);});}}[_0x112097(0x1ef)](_0x38cdd6){const _0x3d2f9c=_0x112097,_0x278409=this[_0x3d2f9c(0x258)][_0x3d2f9c(0x1f3)](_0x38cdd6),_0x2434b4=this[_0x3d2f9c(0x235)][_0x3d2f9c(0x1f3)](_0x38cdd6);if(_0x2434b4&&(_0x2434b4[_0x3d2f9c(0x268)](),this[_0x3d2f9c(0x235)][_0x3d2f9c(0x1ec)](_0x38cdd6)),_0x278409?.[_0x3d2f9c(0x270)]){const _0x57c8e5=this[_0x3d2f9c(0x1eb)](_0x278409[_0x3d2f9c(0x270)]);_0x57c8e5&&_0x57c8e5[_0x3d2f9c(0x247)](_0x6aba1d=>{const _0x3bcdbe=_0x3d2f9c;this[_0x3bcdbe(0x25a)](_0x6aba1d,_0x278409[_0x3bcdbe(0x270)],!0x1);});}this[_0x3d2f9c(0x258)][_0x3d2f9c(0x1ec)](_0x38cdd6),this[_0x3d2f9c(0x26f)](_0x3d2f9c(0x253),{'uiId':_0x38cdd6,'type':_0x278409?.[_0x3d2f9c(0x21d)]}),_0x3d2f9c(0x241)===_0x38cdd6&&this[_0x3d2f9c(0x26b)]();}[_0x112097(0x208)](_0x4dcc3f,_0x401905){const _0x43084e=_0x112097;if(this[_0x43084e(0x258)][_0x43084e(0x254)](_0x4dcc3f[_0x43084e(0x250)])&&(this[_0x43084e(0x258)][_0x43084e(0x260)](_0x4dcc3f[_0x43084e(0x250)],_0x4dcc3f),this[_0x43084e(0x26f)](_0x43084e(0x22b),{'contextItem':_0x4dcc3f,'isLoading':_0x401905}),_0x4dcc3f[_0x43084e(0x270)])){const _0x1578e6=this[_0x43084e(0x1eb)](_0x4dcc3f[_0x43084e(0x270)]);_0x1578e6&&_0x1578e6[_0x43084e(0x247)](_0x48030c=>{const _0x36ec4f=_0x43084e;this[_0x36ec4f(0x25a)](_0x48030c,_0x4dcc3f[_0x36ec4f(0x270)],!0x0);});}}[_0x112097(0x202)](_0x567c9a){const _0x10e592=_0x112097;this[_0x10e592(0x23b)][_0x10e592(0x260)](_0x567c9a[_0x10e592(0x250)],_0x567c9a);}[_0x112097(0x22a)](){const _0x50e5d6=_0x112097;this[_0x50e5d6(0x205)]={'document':{'enabled':!0x1!==this[_0x50e5d6(0x20b)]?.[_0x50e5d6(0x229)]?.[_0x50e5d6(0x217)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x50e5d6(0x20b)]?.[_0x50e5d6(0x26a)]?.[_0x50e5d6(0x217)]},'files':{'enabled':!0x1!==this[_0x50e5d6(0x20b)]?.[_0x50e5d6(0x1fc)]?.[_0x50e5d6(0x217)]},'sources':this[_0x50e5d6(0x1e4)]()},this[_0x50e5d6(0x26f)](_0x50e5d6(0x212),{'options':this[_0x50e5d6(0x205)]});}[_0x112097(0x1e4)](){const _0x343f1b=_0x112097;return this[_0x343f1b(0x20b)]?.[_0x343f1b(0x23e)]?.[_0x343f1b(0x230)](_0x5707ba=>({..._0x5707ba,'resources':[]}))??[];}[_0x112097(0x26b)](){const _0x5c1c8f=_0x112097,_0x551d22=this[_0x5c1c8f(0x1f7)]()||this[_0x5c1c8f(0x233)]();this[_0x5c1c8f(0x205)][_0x5c1c8f(0x229)][_0x5c1c8f(0x207)]=_0x551d22,this[_0x5c1c8f(0x26f)](_0x5c1c8f(0x212),{'options':this[_0x5c1c8f(0x205)]});}[_0x112097(0x209)](_0x330cb0){const _0x1b057f=_0x112097;for(const _0x14a1ed of this[_0x1b057f(0x258)][_0x1b057f(0x1e8)]())if(_0x14a1ed[_0x1b057f(0x270)]===_0x330cb0)return!0x0;for(const _0x20222d of this[_0x1b057f(0x23b)][_0x1b057f(0x1e8)]())if(_0x20222d[_0x1b057f(0x270)]===_0x330cb0)return!0x0;return!0x1;}[_0x112097(0x1eb)](_0x41432){const _0x523d23=_0x112097,_0x25f2ff=[];for(const _0x5d7a41 of this[_0x523d23(0x205)][_0x523d23(0x23e)]){_0x5d7a41[_0x523d23(0x22e)][_0x523d23(0x242)](_0x18a676=>_0x18a676['id']===_0x41432)&&_0x25f2ff[_0x523d23(0x256)](_0x5d7a41['id']);}return 0x0===_0x25f2ff[_0x523d23(0x248)]?null:_0x25f2ff;}[_0x112097(0x25a)](_0x136b3d,_0x2c1f9d,_0x4bcdc9){const _0x37220c=_0x112097,_0x8399f1=this[_0x37220c(0x205)][_0x37220c(0x23e)][_0x37220c(0x242)](_0x1c1e45=>_0x1c1e45['id']===_0x136b3d);if(!_0x8399f1)return;const _0x4f2e0f=_0x8399f1[_0x37220c(0x22e)][_0x37220c(0x242)](_0x1cd4be=>_0x1cd4be['id']===_0x2c1f9d);_0x4f2e0f&&(_0x4f2e0f[_0x37220c(0x214)]=_0x4bcdc9,this[_0x37220c(0x26f)](_0x37220c(0x1e9),{'sourceId':_0x136b3d,'resourceId':_0x2c1f9d,'isInContext':_0x4bcdc9}));}[_0x112097(0x1fa)](_0x1086d2){const _0xd58040=_0x112097;this[_0xd58040(0x25b)][_0xd58040(0x260)](_0x1086d2,!0x0),this[_0xd58040(0x25b)][_0xd58040(0x216)]&&this[_0xd58040(0x26f)](_0xd58040(0x1f8),{'isUploadInProgress':!0x0});}[_0x112097(0x224)](_0x1ac065){const _0x1cc133=_0x112097;this[_0x1cc133(0x25b)][_0x1cc133(0x1ec)](_0x1ac065),0x0===this[_0x1cc133(0x25b)][_0x1cc133(0x216)]&&this[_0x1cc133(0x26f)](_0x1cc133(0x1f8),{'isUploadInProgress':!0x1});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x56de(_0x2107dc,_0x17c60c){const _0x2466a5=_0x2466();return _0x56de=function(_0x56de19,_0x3602f7){_0x56de19=_0x56de19-0x105;let _0x458a72=_0x2466a5[_0x56de19];return _0x458a72;},_0x56de(_0x2107dc,_0x17c60c);}const _0x467859=_0x56de;(function(_0x2850bb,_0x51e222){const _0x333fdf=_0x56de,_0x39dc75=_0x2850bb();while(!![]){try{const _0x53bd07=parseInt(_0x333fdf(0x167))/0x1+-parseInt(_0x333fdf(0x153))/0x2*(parseInt(_0x333fdf(0x136))/0x3)+-parseInt(_0x333fdf(0x112))/0x4+parseInt(_0x333fdf(0x14b))/0x5+-parseInt(_0x333fdf(0x10f))/0x6*(-parseInt(_0x333fdf(0x135))/0x7)+-parseInt(_0x333fdf(0x10c))/0x8*(-parseInt(_0x333fdf(0x169))/0x9)+-parseInt(_0x333fdf(0x149))/0xa*(parseInt(_0x333fdf(0x12c))/0xb);if(_0x53bd07===_0x51e222)break;else _0x39dc75['push'](_0x39dc75['shift']());}catch(_0x2b9c09){_0x39dc75['push'](_0x39dc75['shift']());}}}(_0x2466,0x2f672));import{CKEditorError as _0x4e667b,EmitterMixin as _0x3f49b0,logWarning as _0x5d9628}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x369196}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x5a39c3,AI_CONTEXT_MODEL_EVENT_NAMES as _0x3cc6a0}from'./aichatcontext.js';import{AICapabilities as _0x4859c4,CAPABILITIES_MODEL_EVENT_NAMES as _0x47bf47}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x5e6e38}from'./aichatinteraction.js';import{errorsMap as _0x551e46}from'../../errorsmap.js';function _0x2466(){const _0x38bcaf=['selectedModel','fire','attributes','appendContent','getModel','setConversationTitle','getDocumentContext','addResourceToContext','isSelectionInContext','role','indexOf','6782350MsiKqA','populateFromMessage','652720eFdPHs','createInteraction','start','isStarted','isCurrentDocumentInConversation','conversationInitialized','length','webSearch','112054FWecwW','lastInteraction','removeInteraction','isCurrentDocumentInContext','set','find','chatCapabilities','assistant','prompt','getConversation','code','hasOwn','ai-chat-conversation-set-model-null','quickActionData','chatContext','error','setModel','conversationId','ai-chat-conversation-already-started','ai-chat-conversation-set-model-not-available','340664XxBThA','message','9dyCkyk','interactions','text','modelSelected','options','_extractContextItems','fetchConversation','sessionId','push','modification-delta','createReply','reasoning','chatModels','stop','contextItems','fetchConversationMessages','init','delegate','_processMessagesToInteractions','getCapabilitiesConfig','conversationStarted','loadSourceResources','updateCurrentDocument','interactionCreated','ai-chat-handle-user-conversation-not-initialized','getAvailableModels','2389880kwFPRr','ai-chat-conversation-start-no-model-selected','getPendingContextItems','1670802enruOg','getAll','getCurrentDocumentContext','31728NqaNAm','removeSelectionFromContext','isAvailable','title','getMessages','handleUserInteraction','stack','model','addSelectionToContext','capabilities','addFilesToContext','toggleReasoning','currentReply','removeFromContext','text-delta','updateCurrentDocumentInContext','currentInteraction','ai-chat-conversation-init-failed','getInteraction','ai-chat-conversation-init-from-id-failed','type','toLowerCase','content','user','splice','ai-chat-conversation-start-failed','11riuyho','selectedModelId','ai-chat-handle-user-interaction-already-in-progress','ai-chat-handle-user-interaction-start-failed','load','addUrlToContext','reset','get','group','7prZhAk','9JkNGCR','connector','addCurrentDocumentToContext','addToConversationContext','startConversation','getEditor','destroy','toggleWebSearch'];_0x2466=function(){return _0x38bcaf;};return _0x2466();}export class AIChatConversation extends _0x3f49b0(){['id'];[_0x467859(0x14e)]=!0x1;[_0x467859(0x16a)]=[];[_0x467859(0x122)];[_0x467859(0x13e)];[_0x467859(0x137)];[_0x467859(0x16d)];constructor(_0x540919){const _0x1bb0ed=_0x467859;super(),this[_0x1bb0ed(0x16d)]=_0x540919,this[_0x1bb0ed(0x137)]=_0x540919[_0x1bb0ed(0x137)],this[_0x1bb0ed(0x175)]=_0x540919[_0x1bb0ed(0x175)],this['id']=_0x540919[_0x1bb0ed(0x164)];}async[_0x467859(0x179)](_0x4d5e74){const _0x12c87f=_0x467859;try{this[_0x12c87f(0x161)]=new _0x5a39c3({'connector':this[_0x12c87f(0x137)],'config':_0x4d5e74,'ownerId':this['id']}),this[_0x12c87f(0x161)][_0x12c87f(0x17a)](..._0x3cc6a0)['to'](this),this[_0x12c87f(0x161)][_0x12c87f(0x179)](),this[_0x12c87f(0x159)]=new _0x4859c4(),this[_0x12c87f(0x159)][_0x12c87f(0x17a)](..._0x47bf47)['to'](this),this[_0x12c87f(0x159)][_0x12c87f(0x179)]();const _0x1ecf7a=await this[_0x12c87f(0x175)][_0x12c87f(0x10b)]();this[_0x12c87f(0x13f)](_0x12c87f(0x150),{'availableModels':_0x1ecf7a});const _0x5dbef0=await this[_0x12c87f(0x175)][_0x12c87f(0x142)](this[_0x12c87f(0x16d)][_0x12c87f(0x12d)]);_0x5dbef0&&await this[_0x12c87f(0x163)](_0x5dbef0);}catch(_0x18e09e){const _0x2f4930=new _0x4e667b(_0x12c87f(0x123),null,{'message':_0x18e09e[_0x12c87f(0x168)]||_0x18e09e});_0x2f4930[_0x12c87f(0x118)]=_0x18e09e[_0x12c87f(0x118)],this[_0x12c87f(0x13f)](_0x12c87f(0x162),{'error':_0x2f4930});}}async[_0x467859(0x14d)](){const _0xaf75f5=_0x467859;if(this[_0xaf75f5(0x14e)])throw new _0x4e667b(_0xaf75f5(0x165),null,{'conversation':this});if(!this[_0xaf75f5(0x13e)])throw new _0x4e667b(_0xaf75f5(0x10d),null,{'conversation':this});try{const {id:_0x49e1d9}=await this[_0xaf75f5(0x137)][_0xaf75f5(0x13a)](this['id'],this[_0xaf75f5(0x16d)][_0xaf75f5(0x134)])[_0xaf75f5(0x15c)]();this['id']=_0x49e1d9,this[_0xaf75f5(0x14e)]=!0x0,this[_0xaf75f5(0x13f)](_0xaf75f5(0x106),{'conversationId':this['id'],'selectedModel':this[_0xaf75f5(0x13e)]});}catch(_0x1413bb){const _0x196327=new _0x4e667b(_0xaf75f5(0x12b),null,{'message':_0x1413bb[_0xaf75f5(0x168)],'conversationId':this['id']});throw _0x196327[_0xaf75f5(0x118)]=_0x1413bb[_0xaf75f5(0x118)],this[_0xaf75f5(0x13f)](_0xaf75f5(0x162),{'error':_0x196327}),_0x196327;}}async[_0x467859(0x130)](_0x2bb8a7,_0x3eefd0){const _0x8e6328=_0x467859;try{const _0x21886e=await this[_0x8e6328(0x137)][_0x8e6328(0x16f)](_0x2bb8a7)[_0x8e6328(0x15c)](),_0x3db912=await this[_0x8e6328(0x137)][_0x8e6328(0x178)](_0x2bb8a7)[_0x8e6328(0x116)](),_0x4b44d3=_0x3db912[0x0][_0x8e6328(0x119)];this[_0x8e6328(0x14e)]=!0x0,this['id']=_0x21886e['id'],_0x8e6328(0x115)in _0x21886e?this[_0x8e6328(0x13f)](_0x8e6328(0x143),_0x21886e[_0x8e6328(0x115)],!0x0):this[_0x8e6328(0x13f)](_0x8e6328(0x143),'',!0x0);const _0xb7eb37=(await this[_0x8e6328(0x175)][_0x8e6328(0x110)]())[_0x8e6328(0x158)](_0x4c3743=>_0x4c3743['id'][_0x8e6328(0x127)]()===_0x4b44d3[_0x8e6328(0x127)]());return this[_0x8e6328(0x13e)]=_0xb7eb37,this[_0x8e6328(0x13f)](_0x8e6328(0x16c),{'selectedModel':_0xb7eb37,'isDisabled':!0x0}),await this[_0x8e6328(0x17b)](_0x3db912,_0x3eefd0,_0x4b44d3),this[_0x8e6328(0x122)]=void 0x0,this;}catch(_0x26b750){const _0x101e66=new _0x4e667b(_0x8e6328(0x125),null,{'message':_0x26b750[_0x8e6328(0x168)],'conversationId':_0x2bb8a7});throw _0x101e66[_0x8e6328(0x118)]=_0x26b750[_0x8e6328(0x118)],this[_0x8e6328(0x13f)](_0x8e6328(0x162),{'error':_0x101e66}),_0x101e66;}}async[_0x467859(0x17b)](_0x45c301,_0x3cc7d0,_0x1e5392){const _0x1068f4=_0x467859;let _0x213a8f;for(const _0x1e1628 of _0x45c301)if(_0x1068f4(0x129)===_0x1e1628[_0x1068f4(0x147)]){const _0x22fdc4=await this[_0x1068f4(0x16e)](_0x1e1628),_0x56f4c6={'isReasoningEnabled':Object[_0x1068f4(0x15e)](_0x1e1628[_0x1068f4(0x11b)],_0x1068f4(0x174)),'isWebSearchEnabled':Object[_0x1068f4(0x15e)](_0x1e1628[_0x1068f4(0x11b)],_0x1068f4(0x152))};_0x213a8f=this[_0x1068f4(0x14c)]({'userMessage':_0x1e1628[_0x1068f4(0x15b)],'contextItems':_0x22fdc4,'capabilities':_0x56f4c6,'modelId':_0x1e5392,'quickActionData':_0x1e1628[_0x1068f4(0x140)]?.[_0x1068f4(0x160)]}),this[_0x1068f4(0x122)]=_0x213a8f,this[_0x1068f4(0x161)][_0x1068f4(0x139)](this[_0x1068f4(0x122)][_0x1068f4(0x177)]);}else{if(_0x1068f4(0x15a)===_0x1e1628[_0x1068f4(0x147)]&&_0x213a8f)for(const _0x25c69c of _0x1e1628[_0x1068f4(0x128)]){const _0x477908=_0x1068f4(0x16b)===_0x25c69c[_0x1068f4(0x126)]?_0x1068f4(0x120):_0x1068f4(0x172),_0x2dd1da=_0x213a8f[_0x1068f4(0x144)]()?.[_0x1068f4(0x170)]!==_0x3cc7d0;_0x213a8f[_0x1068f4(0x11e)]=_0x213a8f[_0x1068f4(0x173)]({'type':_0x477908,'isDone':!0x0,'interactionId':_0x213a8f['id'],'areActionsDisabled':_0x2dd1da}),_0x213a8f[_0x1068f4(0x11e)][_0x1068f4(0x141)](_0x25c69c[_0x1068f4(0x128)]);}}}async[_0x467859(0x16e)](_0x30b2ff){const _0x4ce6a1=_0x467859,_0x5ab797=new Map();if(!_0x30b2ff[_0x4ce6a1(0x128)])return _0x5ab797;for(const _0x412391 of _0x30b2ff[_0x4ce6a1(0x128)]){const _0x8bb4ef=await this[_0x4ce6a1(0x161)][_0x4ce6a1(0x14a)](_0x412391);_0x8bb4ef&&_0x5ab797[_0x4ce6a1(0x157)](_0x8bb4ef['id'],_0x8bb4ef);}return _0x5ab797;}async[_0x467859(0x117)]({userMessage:_0x3c0465,quickActionData:_0x53e04c}){const _0x296ed4=_0x467859;if(!this[_0x296ed4(0x14e)])throw new _0x4e667b(_0x296ed4(0x10a),null,{'conversation':this});if(this[_0x296ed4(0x122)])throw new _0x4e667b(_0x296ed4(0x12e),null,{'conversation':this});try{const _0x5cc714=this[_0x296ed4(0x161)][_0x296ed4(0x10e)](),_0x262d1c=this[_0x296ed4(0x159)][_0x296ed4(0x105)](),_0x2ba825=this[_0x296ed4(0x13e)]['id'];this[_0x296ed4(0x122)]=this[_0x296ed4(0x14c)]({'userMessage':_0x3c0465,'contextItems':_0x5cc714,'capabilities':_0x262d1c,'modelId':_0x2ba825,'quickActionData':_0x53e04c}),await this[_0x296ed4(0x122)][_0x296ed4(0x14d)](),this[_0x296ed4(0x161)][_0x296ed4(0x139)](this[_0x296ed4(0x122)][_0x296ed4(0x177)]);}catch(_0x26aa84){if(_0x26aa84 instanceof _0x4e667b)this[_0x296ed4(0x13f)](_0x296ed4(0x162),{'interactionId':this[_0x296ed4(0x122)]?this[_0x296ed4(0x122)]['id']:void 0x0,'error':_0x26aa84});else{const _0x480061=_0x551e46[_0x296ed4(0x133)](_0x26aa84[_0x296ed4(0x15d)])||_0x296ed4(0x12f);this[_0x296ed4(0x13f)](_0x296ed4(0x162),{'interactionId':this[_0x296ed4(0x122)]?this[_0x296ed4(0x122)]['id']:void 0x0,'error':new _0x4e667b(_0x480061,null,{'error':_0x26aa84})});}}finally{this[_0x296ed4(0x122)]?.[_0x296ed4(0x176)](),this[_0x296ed4(0x122)]=void 0x0;}}[_0x467859(0x14c)]({userMessage:_0x344cf5,contextItems:_0x100704,capabilities:_0x66308,modelId:_0x52f354,quickActionData:_0x46249b}){const _0x29fe20=_0x467859,_0x41410c=new _0x5e6e38({'userMessage':_0x344cf5,'contextItems':_0x100704,'capabilities':_0x66308,'conversationId':this['id'],'connector':this[_0x29fe20(0x137)],'editor':this[_0x29fe20(0x16d)][_0x29fe20(0x13b)]&&this[_0x29fe20(0x16d)][_0x29fe20(0x13b)](),'model':_0x52f354,'quickActionData':_0x46249b});return _0x41410c[_0x29fe20(0x17a)](..._0x369196)['to'](this),this[_0x29fe20(0x16a)][_0x29fe20(0x171)](_0x41410c),this[_0x29fe20(0x13f)](_0x29fe20(0x109),_0x41410c),_0x41410c;}[_0x467859(0x124)](_0x6ea84d){const _0x338fa9=_0x467859;return this[_0x338fa9(0x16a)][_0x338fa9(0x158)](_0x3e5749=>_0x3e5749['id']===_0x6ea84d);}[_0x467859(0x155)](_0x3b950d){const _0x39eac1=_0x467859,_0x501191=this[_0x39eac1(0x124)](_0x3b950d);_0x501191&&(_0x501191[_0x39eac1(0x13c)](),this[_0x39eac1(0x16a)][_0x39eac1(0x12a)](this[_0x39eac1(0x16a)][_0x39eac1(0x148)](_0x501191),0x1));}get[_0x467859(0x154)](){const _0x435bd2=_0x467859;return this[_0x435bd2(0x16a)][this[_0x435bd2(0x16a)][_0x435bd2(0x151)]-0x1];}[_0x467859(0x138)](_0x4ccb5b){const _0xf0dee4=_0x467859;this[_0xf0dee4(0x161)][_0xf0dee4(0x138)](_0x4ccb5b);}async[_0x467859(0x121)]({content:_0x15f54c,version:_0x1451ef,sessionId:_0x1a34b0,selections:_0x18c03b}){const _0x4d1921=_0x467859;await this[_0x4d1921(0x161)][_0x4d1921(0x108)](_0x15f54c,_0x1451ef,_0x1a34b0,_0x18c03b);}[_0x467859(0x111)](){const _0x4bbb5c=_0x467859;return this[_0x4bbb5c(0x122)]?.[_0x4bbb5c(0x144)]()?.[_0x4bbb5c(0x128)]||'';}[_0x467859(0x11a)](_0x5b6a98){const _0x5bd313=_0x467859;this[_0x5bd313(0x161)][_0x5bd313(0x11a)](_0x5b6a98);}[_0x467859(0x113)](){const _0x4f01bd=_0x467859;this[_0x4f01bd(0x161)][_0x4f01bd(0x113)]();}[_0x467859(0x11c)](_0x49a893){const _0x51e26e=_0x467859;this[_0x51e26e(0x161)][_0x51e26e(0x11c)](_0x49a893);}[_0x467859(0x131)](_0x596cb5){const _0x404e69=_0x467859;this[_0x404e69(0x161)][_0x404e69(0x131)](_0x596cb5);}[_0x467859(0x145)](_0x1c2487,_0x12d142){const _0x5aee59=_0x467859;this[_0x5aee59(0x161)][_0x5aee59(0x145)](_0x1c2487,_0x12d142);}[_0x467859(0x107)](_0x3781d1,_0x4cc084,_0x587fab){const _0x4301e9=_0x467859;return this[_0x4301e9(0x161)][_0x4301e9(0x107)](_0x3781d1,_0x4cc084,_0x587fab);}[_0x467859(0x11f)](_0x61d1cb){const _0x1a3af4=_0x467859;this[_0x1a3af4(0x161)][_0x1a3af4(0x11f)](_0x61d1cb);}[_0x467859(0x13d)](){const _0x4110d6=_0x467859;this[_0x4110d6(0x159)][_0x4110d6(0x13d)]();}[_0x467859(0x11d)](){const _0x57f30e=_0x467859;this[_0x57f30e(0x159)][_0x57f30e(0x11d)]();}[_0x467859(0x156)](){const _0xeb05ae=_0x467859;return this[_0xeb05ae(0x161)][_0xeb05ae(0x156)]();}[_0x467859(0x14f)](){const _0x56ad98=_0x467859;return this[_0x56ad98(0x161)][_0x56ad98(0x14f)]();}[_0x467859(0x146)](){const _0x625329=_0x467859;return this[_0x625329(0x161)][_0x625329(0x146)]();}async[_0x467859(0x163)](_0x3e24d1){const _0x1df9ad=_0x467859;_0x3e24d1?!0x1===await this[_0x1df9ad(0x175)][_0x1df9ad(0x114)](_0x3e24d1)&&(_0x5d9628(_0x1df9ad(0x166),{'conversation':this,'model':_0x3e24d1}),_0x3e24d1=(await this[_0x1df9ad(0x175)][_0x1df9ad(0x10b)]())[0x0]):(_0x5d9628(_0x1df9ad(0x15f),{'conversation':this}),_0x3e24d1=(await this[_0x1df9ad(0x175)][_0x1df9ad(0x10b)]())[0x0]),_0x3e24d1['id']!==this[_0x1df9ad(0x13e)]?.['id']&&(this[_0x1df9ad(0x13e)]=_0x3e24d1,this[_0x1df9ad(0x159)][_0x1df9ad(0x132)](),this[_0x1df9ad(0x13f)](_0x1df9ad(0x16c),{'selectedModel':_0x3e24d1}));}}
|
|
23
|
+
function _0x29e7(){const _0x4493d0=['isStarted','lastInteraction','message','237910fNDhqq','ai-chat-conversation-set-model-null','getCurrentDocumentContext','addCurrentDocumentToContext','ai-chat-handle-user-conversation-not-initialized','ai-chat-conversation-set-model-not-available','addResourceToContext','handleUserInteraction','ai-chat-handle-user-interaction-already-in-progress','loadSourceResources','currentReply','type','removeSelectionFromContext','model','createReply','sessionId','getConversation','isAvailable','title','getCapabilitiesConfig','ai-chat-conversation-start-failed','capabilities','createInteraction','delegate','ai-chat-handle-user-interaction-start-failed','conversationStarted','fire','setModel','891104uAdVAL','getEditor','error','quickActionData','removeInteraction','modelSelected','populateFromMessage','isSelectionInContext','chatCapabilities','isCurrentDocumentInContext','interactionCreated','setConversationTitle','content','reset','_processMessagesToInteractions','addToConversationContext','updateCurrentDocument','group','65872tdXgBn','user','modification-delta','81sSAjjY','chatContext','init','6iRNpwL','selectedModelId','find','startConversation','length','updateCurrentDocumentInContext','prompt','getModel','start','toLowerCase','fetchConversation','conversationId','selectedModel','addUrlToContext','text','contextItems','3491940kpDDGP','ai-chat-conversation-init-from-id-failed','set','getInteraction','options','removeFromContext','stack','ai-chat-conversation-init-failed','toggleWebSearch','fetchConversationMessages','code','destroy','push','ai-chat-conversation-start-no-model-selected','reasoning','attributes','indexOf','text-delta','isCurrentDocumentInConversation','18HokEdJ','conversationInitialized','currentInteraction','connector','getPendingContextItems','chatModels','getAvailableModels','addSelectionToContext','stop','_extractContextItems','getMessages','addFilesToContext','get','appendContent','webSearch','assistant','899481SvVmHQ','2349858yjAsRN','780056YolyVG','ai-chat-conversation-already-started','hasOwn','splice','toggleReasoning','getDocumentContext','role','getAll','interactions','load'];_0x29e7=function(){return _0x4493d0;};return _0x29e7();}const _0x27180e=_0x46c7;(function(_0x52fc7f,_0x17b6ae){const _0x55904d=_0x46c7,_0x864039=_0x52fc7f();while(!![]){try{const _0x3130f1=parseInt(_0x55904d(0x1a8))/0x1+parseInt(_0x55904d(0x16f))/0x2*(parseInt(_0x55904d(0x198))/0x3)+-parseInt(_0x55904d(0x15d))/0x4+parseInt(_0x55904d(0x1b7))/0x5*(-parseInt(_0x55904d(0x175))/0x6)+parseInt(_0x55904d(0x1a9))/0x7+parseInt(_0x55904d(0x1aa))/0x8*(-parseInt(_0x55904d(0x172))/0x9)+parseInt(_0x55904d(0x185))/0xa;if(_0x3130f1===_0x17b6ae)break;else _0x864039['push'](_0x864039['shift']());}catch(_0x5986fc){_0x864039['push'](_0x864039['shift']());}}}(_0x29e7,0x9acd0));function _0x46c7(_0x2396db,_0x43ee06){const _0x29e7a9=_0x29e7();return _0x46c7=function(_0x46c786,_0x2e1762){_0x46c786=_0x46c786-0x158;let _0x35dc4=_0x29e7a9[_0x46c786];return _0x35dc4;},_0x46c7(_0x2396db,_0x43ee06);}import{CKEditorError as _0x58cf55,EmitterMixin as _0x392dce,logWarning as _0x3e202a}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x37efe1}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x501822,AI_CONTEXT_MODEL_EVENT_NAMES as _0x33dd08}from'./aichatcontext.js';import{AICapabilities as _0x59e187,CAPABILITIES_MODEL_EVENT_NAMES as _0x58600e}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x35f633}from'./aichatinteraction.js';import{errorsMap as _0xb34857}from'../../errorsmap.js';export class AIChatConversation extends _0x392dce(){['id'];[_0x27180e(0x1b4)]=!0x1;[_0x27180e(0x1b2)]=[];[_0x27180e(0x19a)];[_0x27180e(0x181)];[_0x27180e(0x19b)];[_0x27180e(0x189)];constructor(_0x468cc0){const _0x5f4ee6=_0x27180e;super(),this[_0x5f4ee6(0x189)]=_0x468cc0,this[_0x5f4ee6(0x19b)]=_0x468cc0[_0x5f4ee6(0x19b)],this[_0x5f4ee6(0x19d)]=_0x468cc0[_0x5f4ee6(0x19d)],this['id']=_0x468cc0[_0x5f4ee6(0x180)];}async[_0x27180e(0x174)](_0x1b2b6c){const _0x508473=_0x27180e;try{this[_0x508473(0x173)]=new _0x501822({'connector':this[_0x508473(0x19b)],'config':_0x1b2b6c,'ownerId':this['id']}),this[_0x508473(0x173)][_0x508473(0x158)](..._0x33dd08)['to'](this),this[_0x508473(0x173)][_0x508473(0x174)](),this[_0x508473(0x165)]=new _0x59e187(),this[_0x508473(0x165)][_0x508473(0x158)](..._0x58600e)['to'](this),this[_0x508473(0x165)][_0x508473(0x174)]();const _0x56c6b5=await this[_0x508473(0x19d)][_0x508473(0x19e)]();this[_0x508473(0x15b)](_0x508473(0x199),{'availableModels':_0x56c6b5});const _0x1d6f69=await this[_0x508473(0x19d)][_0x508473(0x17c)](this[_0x508473(0x189)][_0x508473(0x176)]);_0x1d6f69&&await this[_0x508473(0x15c)](_0x1d6f69);}catch(_0x5b82fb){const _0x33d983=new _0x58cf55(_0x508473(0x18c),null,{'message':_0x5b82fb[_0x508473(0x1b6)]||_0x5b82fb});_0x33d983[_0x508473(0x18b)]=_0x5b82fb[_0x508473(0x18b)],this[_0x508473(0x15b)](_0x508473(0x15f),{'error':_0x33d983});}}async[_0x27180e(0x17d)](){const _0x56d21e=_0x27180e;if(this[_0x56d21e(0x1b4)])throw new _0x58cf55(_0x56d21e(0x1ab),null,{'conversation':this});if(!this[_0x56d21e(0x181)])throw new _0x58cf55(_0x56d21e(0x192),null,{'conversation':this});try{const {id:_0x41b3f5}=await this[_0x56d21e(0x19b)][_0x56d21e(0x178)](this['id'],this[_0x56d21e(0x189)][_0x56d21e(0x16e)])[_0x56d21e(0x1c7)]();this['id']=_0x41b3f5,this[_0x56d21e(0x1b4)]=!0x0,this[_0x56d21e(0x15b)](_0x56d21e(0x15a),{'conversationId':this['id'],'selectedModel':this[_0x56d21e(0x181)]});}catch(_0x4da94e){const _0x1332a7=new _0x58cf55(_0x56d21e(0x1cb),null,{'message':_0x4da94e[_0x56d21e(0x1b6)],'conversationId':this['id']});throw _0x1332a7[_0x56d21e(0x18b)]=_0x4da94e[_0x56d21e(0x18b)],this[_0x56d21e(0x15b)](_0x56d21e(0x15f),{'error':_0x1332a7}),_0x1332a7;}}async[_0x27180e(0x1b3)](_0x214c2a,_0x888c60){const _0x3cc737=_0x27180e;try{const _0x3b5ca3=await this[_0x3cc737(0x19b)][_0x3cc737(0x17f)](_0x214c2a)[_0x3cc737(0x1c7)](),_0x5ef02d=await this[_0x3cc737(0x19b)][_0x3cc737(0x18e)](_0x214c2a)[_0x3cc737(0x1a2)](),_0x5522bf=_0x5ef02d[0x0][_0x3cc737(0x1c4)];this[_0x3cc737(0x1b4)]=!0x0,this['id']=_0x3b5ca3['id'],_0x3cc737(0x1c9)in _0x3b5ca3?this[_0x3cc737(0x15b)](_0x3cc737(0x168),_0x3b5ca3[_0x3cc737(0x1c9)],!0x0):this[_0x3cc737(0x15b)](_0x3cc737(0x168),'',!0x0);const _0x411087=(await this[_0x3cc737(0x19d)][_0x3cc737(0x1b1)]())[_0x3cc737(0x177)](_0x893406=>_0x893406['id'][_0x3cc737(0x17e)]()===_0x5522bf[_0x3cc737(0x17e)]());return this[_0x3cc737(0x181)]=_0x411087,this[_0x3cc737(0x15b)](_0x3cc737(0x162),{'selectedModel':_0x411087,'isDisabled':!0x0}),await this[_0x3cc737(0x16b)](_0x5ef02d,_0x888c60,_0x5522bf),this[_0x3cc737(0x19a)]=void 0x0,this;}catch(_0x1baf8f){const _0x280900=new _0x58cf55(_0x3cc737(0x186),null,{'message':_0x1baf8f[_0x3cc737(0x1b6)],'conversationId':_0x214c2a});throw _0x280900[_0x3cc737(0x18b)]=_0x1baf8f[_0x3cc737(0x18b)],this[_0x3cc737(0x15b)](_0x3cc737(0x15f),{'error':_0x280900}),_0x280900;}}async[_0x27180e(0x16b)](_0x4796bb,_0x1a7a3b,_0x436cf8){const _0x1345f4=_0x27180e;let _0x4711a5;for(const _0xea1e72 of _0x4796bb)if(_0x1345f4(0x170)===_0xea1e72[_0x1345f4(0x1b0)]){const _0x42ab69=await this[_0x1345f4(0x1a1)](_0xea1e72),_0x1c22cc={'isReasoningEnabled':Object[_0x1345f4(0x1ac)](_0xea1e72[_0x1345f4(0x1cc)],_0x1345f4(0x193)),'isWebSearchEnabled':Object[_0x1345f4(0x1ac)](_0xea1e72[_0x1345f4(0x1cc)],_0x1345f4(0x1a6))};_0x4711a5=this[_0x1345f4(0x1cd)]({'userMessage':_0xea1e72[_0x1345f4(0x17b)],'contextItems':_0x42ab69,'capabilities':_0x1c22cc,'modelId':_0x436cf8,'quickActionData':_0xea1e72[_0x1345f4(0x194)]?.[_0x1345f4(0x160)]}),this[_0x1345f4(0x19a)]=_0x4711a5,this[_0x1345f4(0x173)][_0x1345f4(0x16c)](this[_0x1345f4(0x19a)][_0x1345f4(0x184)]);}else{if(_0x1345f4(0x1a7)===_0xea1e72[_0x1345f4(0x1b0)]&&_0x4711a5)for(const _0x5ce84e of _0xea1e72[_0x1345f4(0x169)]){const _0x51fe54=_0x1345f4(0x183)===_0x5ce84e[_0x1345f4(0x1c2)]?_0x1345f4(0x196):_0x1345f4(0x171),_0x3b7632=_0x4711a5[_0x1345f4(0x1af)]()?.[_0x1345f4(0x1c6)]!==_0x1a7a3b;_0x4711a5[_0x1345f4(0x1c1)]=_0x4711a5[_0x1345f4(0x1c5)]({'type':_0x51fe54,'isDone':!0x0,'interactionId':_0x4711a5['id'],'areActionsDisabled':_0x3b7632}),_0x4711a5[_0x1345f4(0x1c1)][_0x1345f4(0x1a5)](_0x5ce84e[_0x1345f4(0x169)]);}}}async[_0x27180e(0x1a1)](_0x32631){const _0x5e17b9=_0x27180e,_0x38818b=new Map();if(!_0x32631[_0x5e17b9(0x169)])return _0x38818b;for(const _0x37b4d8 of _0x32631[_0x5e17b9(0x169)]){const _0x352133=await this[_0x5e17b9(0x173)][_0x5e17b9(0x163)](_0x37b4d8);_0x352133&&_0x38818b[_0x5e17b9(0x187)](_0x352133['id'],_0x352133);}return _0x38818b;}async[_0x27180e(0x1be)]({userMessage:_0x4bface,quickActionData:_0x2934c5}){const _0x154b6d=_0x27180e;if(!this[_0x154b6d(0x1b4)])throw new _0x58cf55(_0x154b6d(0x1bb),null,{'conversation':this});if(this[_0x154b6d(0x19a)])throw new _0x58cf55(_0x154b6d(0x1bf),null,{'conversation':this});try{const _0xe10324=this[_0x154b6d(0x173)][_0x154b6d(0x19c)](),_0x23b05d=this[_0x154b6d(0x165)][_0x154b6d(0x1ca)](),_0x4b501d=this[_0x154b6d(0x181)]['id'];this[_0x154b6d(0x19a)]=this[_0x154b6d(0x1cd)]({'userMessage':_0x4bface,'contextItems':_0xe10324,'capabilities':_0x23b05d,'modelId':_0x4b501d,'quickActionData':_0x2934c5}),await this[_0x154b6d(0x19a)][_0x154b6d(0x17d)](),this[_0x154b6d(0x173)][_0x154b6d(0x16c)](this[_0x154b6d(0x19a)][_0x154b6d(0x184)]);}catch(_0x569b8f){if(_0x569b8f instanceof _0x58cf55)this[_0x154b6d(0x15b)](_0x154b6d(0x15f),{'interactionId':this[_0x154b6d(0x19a)]?this[_0x154b6d(0x19a)]['id']:void 0x0,'error':_0x569b8f});else{const _0x4e6f5b=_0xb34857[_0x154b6d(0x1a4)](_0x569b8f[_0x154b6d(0x18f)])||_0x154b6d(0x159);this[_0x154b6d(0x15b)](_0x154b6d(0x15f),{'interactionId':this[_0x154b6d(0x19a)]?this[_0x154b6d(0x19a)]['id']:void 0x0,'error':new _0x58cf55(_0x4e6f5b,null,{'error':_0x569b8f})});}}finally{this[_0x154b6d(0x19a)]?.[_0x154b6d(0x1a0)](),this[_0x154b6d(0x19a)]=void 0x0;}}[_0x27180e(0x1cd)]({userMessage:_0x43b6c7,contextItems:_0x203548,capabilities:_0x446bd9,modelId:_0x2a4d03,quickActionData:_0x1e16a1}){const _0x5ee99b=_0x27180e,_0x549c5f=new _0x35f633({'userMessage':_0x43b6c7,'contextItems':_0x203548,'capabilities':_0x446bd9,'conversationId':this['id'],'connector':this[_0x5ee99b(0x19b)],'editor':this[_0x5ee99b(0x189)][_0x5ee99b(0x15e)]&&this[_0x5ee99b(0x189)][_0x5ee99b(0x15e)](),'model':_0x2a4d03,'quickActionData':_0x1e16a1});return _0x549c5f[_0x5ee99b(0x158)](..._0x37efe1)['to'](this),this[_0x5ee99b(0x1b2)][_0x5ee99b(0x191)](_0x549c5f),this[_0x5ee99b(0x15b)](_0x5ee99b(0x167),_0x549c5f),_0x549c5f;}[_0x27180e(0x188)](_0x2b257c){const _0x28f0a7=_0x27180e;return this[_0x28f0a7(0x1b2)][_0x28f0a7(0x177)](_0x166945=>_0x166945['id']===_0x2b257c);}[_0x27180e(0x161)](_0xd5a194){const _0x504bc0=_0x27180e,_0x436f8a=this[_0x504bc0(0x188)](_0xd5a194);_0x436f8a&&(_0x436f8a[_0x504bc0(0x190)](),this[_0x504bc0(0x1b2)][_0x504bc0(0x1ad)](this[_0x504bc0(0x1b2)][_0x504bc0(0x195)](_0x436f8a),0x1));}get[_0x27180e(0x1b5)](){const _0x284aa5=_0x27180e;return this[_0x284aa5(0x1b2)][this[_0x284aa5(0x1b2)][_0x284aa5(0x179)]-0x1];}[_0x27180e(0x1ba)](_0x419894){const _0x5c2425=_0x27180e;this[_0x5c2425(0x173)][_0x5c2425(0x1ba)](_0x419894);}async[_0x27180e(0x17a)]({content:_0x1d2fde,version:_0x530824,sessionId:_0xf42416,selections:_0x84ad8c}){const _0x245eff=_0x27180e;await this[_0x245eff(0x173)][_0x245eff(0x16d)](_0x1d2fde,_0x530824,_0xf42416,_0x84ad8c);}[_0x27180e(0x1b9)](){const _0x1fb163=_0x27180e;return this[_0x1fb163(0x19a)]?.[_0x1fb163(0x1af)]()?.[_0x1fb163(0x169)]||'';}[_0x27180e(0x19f)](_0x547215){const _0x46edd2=_0x27180e;this[_0x46edd2(0x173)][_0x46edd2(0x19f)](_0x547215);}[_0x27180e(0x1c3)](){const _0x53372e=_0x27180e;this[_0x53372e(0x173)][_0x53372e(0x1c3)]();}[_0x27180e(0x1a3)](_0xb2d724){const _0x52ffd7=_0x27180e;this[_0x52ffd7(0x173)][_0x52ffd7(0x1a3)](_0xb2d724);}[_0x27180e(0x182)](_0xeb8f21){const _0x1a9314=_0x27180e;this[_0x1a9314(0x173)][_0x1a9314(0x182)](_0xeb8f21);}[_0x27180e(0x1bd)](_0x4a8b77,_0x4f77bf){const _0x22de47=_0x27180e;this[_0x22de47(0x173)][_0x22de47(0x1bd)](_0x4a8b77,_0x4f77bf);}[_0x27180e(0x1c0)](_0x5e87ac,_0x2a92d2,_0x32ae01){const _0x545bb3=_0x27180e;return this[_0x545bb3(0x173)][_0x545bb3(0x1c0)](_0x5e87ac,_0x2a92d2,_0x32ae01);}[_0x27180e(0x18a)](_0x154758){const _0x10404d=_0x27180e;this[_0x10404d(0x173)][_0x10404d(0x18a)](_0x154758);}[_0x27180e(0x18d)](){const _0xd2632f=_0x27180e;this[_0xd2632f(0x165)][_0xd2632f(0x18d)]();}[_0x27180e(0x1ae)](){const _0xf2771e=_0x27180e;this[_0xf2771e(0x165)][_0xf2771e(0x1ae)]();}[_0x27180e(0x166)](){const _0x2e87d8=_0x27180e;return this[_0x2e87d8(0x173)][_0x2e87d8(0x166)]();}[_0x27180e(0x197)](){const _0x35660c=_0x27180e;return this[_0x35660c(0x173)][_0x35660c(0x197)]();}[_0x27180e(0x164)](){const _0x457ac8=_0x27180e;return this[_0x457ac8(0x173)][_0x457ac8(0x164)]();}async[_0x27180e(0x15c)](_0x24bda3){const _0x5b54a9=_0x27180e;_0x24bda3?!0x1===await this[_0x5b54a9(0x19d)][_0x5b54a9(0x1c8)](_0x24bda3)&&(_0x3e202a(_0x5b54a9(0x1bc),{'conversation':this,'model':_0x24bda3}),_0x24bda3=(await this[_0x5b54a9(0x19d)][_0x5b54a9(0x19e)]())[0x0]):(_0x3e202a(_0x5b54a9(0x1b8),{'conversation':this}),_0x24bda3=(await this[_0x5b54a9(0x19d)][_0x5b54a9(0x19e)]())[0x0]),_0x24bda3['id']!==this[_0x5b54a9(0x181)]?.['id']&&(this[_0x5b54a9(0x181)]=_0x24bda3,this[_0x5b54a9(0x165)][_0x5b54a9(0x16a)](),this[_0x5b54a9(0x15b)](_0x5b54a9(0x162),{'selectedModel':_0x24bda3}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x33b8bf=_0x4175;(function(_0x437d41,_0xe86151){var _0x14c473=_0x4175,_0x11894b=_0x437d41();while(!![]){try{var _0x6c6386=parseInt(_0x14c473(0x154))/0x1*(-parseInt(_0x14c473(0x15d))/0x2)+parseInt(_0x14c473(0x152))/0x3*(-parseInt(_0x14c473(0x150))/0x4)+parseInt(_0x14c473(0x157))/0x5+-parseInt(_0x14c473(0x15c))/0x6+-parseInt(_0x14c473(0x164))/0x7*(-parseInt(_0x14c473(0x168))/0x8)+parseInt(_0x14c473(0x162))/0x9+parseInt(_0x14c473(0x15b))/0xa*(parseInt(_0x14c473(0x155))/0xb);if(_0x6c6386===_0xe86151)break;else _0x11894b['push'](_0x11894b['shift']());}catch(_0x44c280){_0x11894b['push'](_0x11894b['shift']());}}}(_0x4c02,0x33d2e));import{AICapabilities as _0x49017d}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x4e871a}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1be0ca}from'./aichatcontext.js';function _0x4175(_0x340be0,_0xff027e){var _0x4c028b=_0x4c02();return _0x4175=function(_0x41754a,_0x3aa0f6){_0x41754a=_0x41754a-0x150;var _0x1541d0=_0x4c028b[_0x41754a];return _0x1541d0;},_0x4175(_0x340be0,_0xff027e);}function _0x4c02(){var _0x5edcd0=['4yqMMFG','current-document','get','capabilities','sendRequest','3106377ZxJjBT','quickActionData','106225AWCqyn','getDocumentContext','userMessage','mapContextItemsToRequestData','64jYHrQa','4gAnTxO','contextItems','567723kQSUny','model','19993oQgjqO','913QjguET','conversationId','1319595DluDhx','getCapabilitiesRequestData','queryAssistant','connector','7510CNTXdX','2107848ZnHZcL'];_0x4c02=function(){return _0x5edcd0;};return _0x4c02();}export class AIChatInteraction extends _0x4e871a{[_0x33b8bf(0x166)];[_0x33b8bf(0x156)];[_0x33b8bf(0x151)]=new Map();[_0x33b8bf(0x153)];[_0x33b8bf(0x163)];constructor(_0x2e6f4b){var _0x29060a=_0x33b8bf;super(_0x2e6f4b),this[_0x29060a(0x156)]=_0x2e6f4b[_0x29060a(0x156)],this[_0x29060a(0x151)]=_0x2e6f4b[_0x29060a(0x151)],this[_0x29060a(0x160)]=_0x2e6f4b[_0x29060a(0x160)],this[_0x29060a(0x166)]=_0x2e6f4b[_0x29060a(0x166)],this[_0x29060a(0x153)]=_0x2e6f4b[_0x29060a(0x153)],this[_0x29060a(0x163)]=_0x2e6f4b[_0x29060a(0x163)];}async[_0x33b8bf(0x161)](){var _0x179943=_0x33b8bf;return this[_0x179943(0x15a)][_0x179943(0x159)]({'message':this[_0x179943(0x166)],'conversationId':this[_0x179943(0x156)],'parts':_0x1be0ca[_0x179943(0x167)](this[_0x179943(0x151)]),'capabilities':_0x49017d[_0x179943(0x158)](this[_0x179943(0x160)]),'model':this[_0x179943(0x153)],'quickActionData':this[_0x179943(0x163)]});}[_0x33b8bf(0x165)](){var _0x1170e7=_0x33b8bf;return this[_0x1170e7(0x151)][_0x1170e7(0x15f)](_0x1170e7(0x15e));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x9e82ee=_0x3f37;(function(_0x1e1b11,_0x5c4529){const _0x504081=_0x3f37,_0x5197fd=_0x1e1b11();while(!![]){try{const _0x1c5004=parseInt(_0x504081(0x151))/0x1+-parseInt(_0x504081(0x14d))/0x2*(parseInt(_0x504081(0x157))/0x3)+parseInt(_0x504081(0x156))/0x4*(parseInt(_0x504081(0x14b))/0x5)+-parseInt(_0x504081(0x155))/0x6*(parseInt(_0x504081(0x150))/0x7)+-parseInt(_0x504081(0x158))/0x8*(parseInt(_0x504081(0x15c))/0x9)+parseInt(_0x504081(0x14f))/0xa+-parseInt(_0x504081(0x14e))/0xb*(-parseInt(_0x504081(0x14c))/0xc);if(_0x1c5004===_0x5c4529)break;else _0x5197fd['push'](_0x5197fd['shift']());}catch(_0x2fdfef){_0x5197fd['push'](_0x5197fd['shift']());}}}(_0x3530,0x83ba6));import{AIModels as _0x1a6468}from'../../aicore/model/aimodels.js';function _0x3f37(_0x48ab25,_0x1b073b){const _0x3530e6=_0x3530();return _0x3f37=function(_0x3f3725,_0x4921d4){_0x3f3725=_0x3f3725-0x14b;let _0x509751=_0x3530e6[_0x3f3725];return _0x509751;},_0x3f37(_0x48ab25,_0x1b073b);}function _0x3530(){const _0x54c727=['length','values','6RZwCrb','8gIBqvG','963fnHwVq','67256msJiRy','enabled','filter','sort','387ZYaBgP','capabilities','341435vAPUka','204wMtKpF','318TqAYxO','247841njqBfb','2444290IgCCcj','4602122avGRUS','845514SulQBS','getAll'];_0x3530=function(){return _0x54c727;};return _0x3530();}export class AIChatModels extends _0x1a6468{async[_0x9e82ee(0x152)](){const _0x100e30=_0x9e82ee;return(await super[_0x100e30(0x152)]())[_0x100e30(0x15b)]((_0xba8b91,_0x47ff29)=>{const _0x4e62e0=_0x100e30,_0x2518e4=Object[_0x4e62e0(0x154)](_0xba8b91[_0x4e62e0(0x15d)])[_0x4e62e0(0x15a)](_0x12a14b=>_0x12a14b[_0x4e62e0(0x159)])[_0x4e62e0(0x153)];return Object[_0x4e62e0(0x154)](_0x47ff29[_0x4e62e0(0x15d)])[_0x4e62e0(0x15a)](_0x3cc39e=>_0x3cc39e[_0x4e62e0(0x159)])[_0x4e62e0(0x153)]-_0x2518e4;});}}
|