@ckeditor/ckeditor5-ai 47.0.0 → 47.1.0-alpha.0
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/ckeditor5-metadata.json +9 -2
- package/dist/index-editor.css +119 -34
- package/dist/index.css +144 -35
- package/dist/index.js +4 -4
- 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/lang/contexts.json +5 -0
- 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.d.ts +3 -3
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.d.ts +6 -0
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.d.ts +2 -4
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.d.ts +11 -4
- package/src/aichat/model/aichatmodels.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.d.ts +9 -0
- 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/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesview.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/aichat/utils/scrollmanager.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 +1 -1
- package/src/aichathistory/ui/aichathistorylistview.js +1 -1
- package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
- package/src/aichathistory/ui/aichathistoryview.js +1 -1
- package/src/aiconfig.d.ts +4 -0
- 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/aireply.d.ts +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/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.d.ts +2 -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.d.ts +2 -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/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.d.ts +3 -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.d.ts +6 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +31 -3
- package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewmodels.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +5 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +7 -5
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.d.ts +3 -0
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +4 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +27 -3
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +13 -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.d.ts +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.d.ts +4 -0
- 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.d.ts +5 -0
- package/src/errors.js +23 -0
- package/src/index.js +1 -1
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +4 -0
- package/theme/aichat/aichat-controls/model-unavailable-message.css +39 -0
- package/theme/aichat/aichat-controls.css +1 -0
- package/theme/aichat/aichat.css +0 -1
- package/theme/aichat/aichatfeed.css +9 -0
- package/theme/aichat/aisuggestioncontainer.css +7 -1
- package/theme/aireviewmode/aireviewmode-balloon-panel-suggestion.css +4 -0
- package/theme/aireviewmode/aireviewmode-check-list.css +4 -0
- package/theme/aireviewmode/aireviewmode-check-run-result.css +25 -19
- package/theme/aireviewmode/aireviewmode-check-run.css +35 -7
- package/theme/aitabs/aitabsview.css +2 -2
- package/theme/aitabs/tabs/tabsview.css +13 -3
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +0 -16
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +0 -23
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x19ee94=_0x2a06;(function(_0x32653c,_0x3fc022){const _0x528cb1=_0x2a06,_0x12c789=_0x32653c();while(!![]){try{const _0xa5faa6=-parseInt(_0x528cb1(0xb7))/0x1+-parseInt(_0x528cb1(0x1c0))/0x2*(-parseInt(_0x528cb1(0x150))/0x3)+-parseInt(_0x528cb1(0x1de))/0x4+-parseInt(_0x528cb1(0x19d))/0x5+parseInt(_0x528cb1(0xb1))/0x6*(-parseInt(_0x528cb1(0xd2))/0x7)+-parseInt(_0x528cb1(0x175))/0x8+parseInt(_0x528cb1(0xfb))/0x9;if(_0xa5faa6===_0x3fc022)break;else _0x12c789['push'](_0x12c789['shift']());}catch(_0x322606){_0x12c789['push'](_0x12c789['shift']());}}}(_0x2f6c,0xa2cd1));import{ContextPlugin as _0x23175c,Editor as _0x5a2f64}from'ckeditor5/src/core.js';function _0x2a06(_0x511a84,_0xef870d){const _0x2f6c13=_0x2f6c();return _0x2a06=function(_0x2a065e,_0x575a1d){_0x2a065e=_0x2a065e-0xac;let _0x5e2e73=_0x2f6c13[_0x2a065e];return _0x5e2e73;},_0x2a06(_0x511a84,_0xef870d);}import{CKEditorError as _0x555cfc,logError as _0x322e37,scrollViewportToShowTarget as _0x360cfb,uid as _0x1dc6c9}from'ckeditor5/src/utils.js';import{AIConnector as _0x23f487}from'../aicore/aiconnector.js';import{AITabs as _0x351dd5}from'../aitabs/aitabs.js';import{AIChatConversation as _0x3aaab2}from'./model/aichatconversation.js';function _0x2f6c(){const _0x59db4c=['viewRangeToDom','_applySuggestion','replyCreated','ai-conversation-','_filterModels','applyOperation','contextItemRemoved','view','parse','clearConversationContextUI','removeFromContext','createPositionAt','sendUserMessage','pending','AIEditing','sourcePosition','type','stop','toggleLoadingSkeleton','setChangeGroupState','get','ai-chat-context-unsupported-type','replyId','_getDocumentRangeForReplyChanges','range','mouseLeaveSuggestion','getOperations','path','interactionDestroyed','removeSelectionFromChatContext','resource','add','setFeedItemRenderingStrategy','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','listenTo','startInteraction','ai-chat-context-invalid-data','history','loadSourceResources','Liked\x20response','changeGroups','markers','startsWith','selectModel','modification-delta','undo','_toggleReasoning','resize','isOpen','maxOffset','nextSibling','filter','query','isCurrentDocumentInConversation','alignToTop','removeMarker','indexes','toViewRange','baseVersion','_toggleWebSearch','isDisabled','updateCapabilities','mapper','ai-request-aborted','start','webSearchStarted','revert','setIsUploadInProgress','getPath','getReply','Failed\x20to\x20load\x20conversation','setIsMaximized','ai.chat.models.displayedModels','abortPromptStream','addUrlToContext','children','_handleUIUserMessage','_scrollToSuggestionRange','ready','capabilitiesUpdated','1933770LmyzPG','ai.chat.context','messageId','addOperation','getInteractionAndReplyById','_aiEditing','push','contextItems','contextItemLoadingEnded','activeConversation','addFileToContext','_createFromRanges','AI_BALLOON_HEADER_TITLE','Showing\x20conversation\x20history...','addDocumentToContext','getInteraction','ai-chat-controller-no-active-conversation','isPremiumPlugin','root','disableControls','setConversationContext','_balloonShowDiff','getChild','cloneNode','ai-chat-source-resources-load-failed','getRoot','data-id','howMany','conversationInitialized','editing','_updateRatings','main','insertSuggestion','from','stopInteraction','removeContextItem','applySuggestion','9043096bKOyBs','_applyOperationsAsSuggestions','AI_CHAT_CONTEXT_INVALID_DATA','ai-chat-missing-channel-id','replies','mouseOverSuggestion','addFeedItemError','replyChangeGroupStateUpdated','slice','setConversationTitle','getSelectionText','getRanges','resetMessageInput','sendMessage','locale','end','node','ai-chat-controller-mouse-over','createConversation','ai.chat.models.defaultModelId','Disliked\x20response','unshift','_integrateEditor','AI_CHAT_ABORTED_MESSAGE','ai-chat-file-upload-failed','state','getDiff','stopListening','_stopLastInteraction','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','finishInteraction','_flushLastInteractionUI','_openBalloonFor','collaboration.channelId','load','resources','resourceId','addSelectionToContext','new','showFakeVisualSelection','141315IjgZVR','Undo','_showConversationHistory','rejectSuggestion','uid','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','log','showDiff','anchorId','config','availableModels','contextSent','getAttribute','delete','addContextItem','handleRemovedConversation','lastInteraction','AIConnector','has','addFeedItemUserMessage','contextItem','content','_handleStartConversation','selectedModel','updateConversationTitle','_aiChatModels','_startConversationSafely','length','provider','enableControls','getGroupId','isDocumentOperation','data','interactionId','AITabs','2TpEBTL','marker','domConverter','createRange','updateFeedItemAIReplySources','AI_CHAT_RESOURCE_LOAD_FAILED','message','updateFeedItemAIReplyContent','sourceResourcesLoaded','removeSelectionFromContext','contextItemAdded','showPrevious','getMarkersGroup','addSelectionToChatContext','createPositionFromPath','ai-chat-url-upload-failed','addFeedItemAIReply','getChildAtOffset','partIndex','commands','interactionFinished','updateContent','upsertAIChatRating','init','selection','toLocaleLowerCase','current-document','addCurrentDocumentToContext','find','isInContext','4287344RcRqye','startConversation','populateSourceResourceBalloon','dislike','remove','addResourceToContext','batch','close','resizedTabs','activateTab','ai-chat-conversation-start-failed','getChildren','chat','_aiConnector','toggleReasoning','isLoading','AIChatUI','setAddContextOptions','sources','isUploadInProgress','updateFeedItemAIReplySuggestionPartState','uploadProgressChanged','modelSelected','reasoningStarted','showChangeInText','webSearchFinished','string','open','dialogClosed','loadConversation','version','AI_CHAT_UNTITLED_CONVERSATION','_setIsMaximized','forEach','getTransformedByOperation','sourceId','AI_CHAT_GENERIC_ERROR','DocumentCompare','rejected','resizeTabs','change','text-delta','addFilesToContext','addFeedInteractionHeader','resourceStateChanged','48PQFHmE','changes','AIChatController','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','uiId','full','313547OIqwyg','updateResourceState','requires','handleUserInteraction','setModel','setLoadingMessage','_logError','split','_insertSuggestion','_batchToChanges','showNext','scrollFeedToSuggestion','editors','$graveyard','accepted','updateFeedItemAIReplySuggestionContent','addContextOptionsChanged','isCurrentDocumentInContext','interactionCreated','toggleSuggestionDisplayMode','resetConversationTitle','getFirstRange','addFeedItemStaticMessage','error','_previewedChangeGroup','plugins','afterInit','522277CwojlY','setContextItemLoading','ai-chat-resource-load-failed','toggleWebSearch','clearPendingContextUI','addFeedItemAISuggestion','removeFeedInteraction','static','model','replyContentUpdated','reasoningFinished','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','streaming','TrackChangesEditing','map','getDocumentData','pluginName','setSelectedModel','isStarted','set','updateCurrentDocumentInContext','removed','source','getDocumentContext','focusPromptInput','closeSourceResourceBalloon','_removeAISelectionMarkers','_removeFromContext','name','document','hideFakeVisualSelection','interactionStarted','documentContextContent','_aiChatUi','context','redo','like','indexOf','rootName','ai-chat-conversation-init-failed','AI_CHAT_UNABLE_TO_START_CONVERSATION','28468476DatNil','_updateReplyContent','options','isOfficialPlugin','toString'];_0x2f6c=function(){return _0x59db4c;};return _0x2f6c();}import{getTranslation as _0x410147}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x2d0105}from'../aicore/aiediting.js';import{AIChatModels as _0x1cd0b4}from'./model/aichatmodels.js';import{getEditorFromContext as _0xe358}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x2c7119,DATA_ID_MODEL_ATTRIBUTE as _0x2adcc9}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x2857f1}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x58915b,getMinimalSelection as _0x2f69f3,getSuggestionPartsFromReply as _0x121a6f}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x2e571f,_DetachOperation as _0xcc7966}from'ckeditor5/src/engine.js';import{findOne as _0x17576e,getAttribute as _0x21da1a,serialize as _0x5571d8,Document as _0x5e6c42,findByAttribute as _0x420881}from'../aicore/utils/htmlparser.js';import{IconAI as _0x124f51}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x4a6bc9}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0xc519a1}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x23175c{[_0x19ee94(0x155)];[_0x19ee94(0x1eb)];[_0x19ee94(0xf3)];[_0x19ee94(0x1b6)];[_0x19ee94(0xc0)]=new Map();[_0x19ee94(0xcf)]=null;[_0x19ee94(0x165)]=!0x1;static get[_0x19ee94(0xb9)](){return[_0x23f487,_0xc519a1,_0x2c7119];}static get[_0x19ee94(0xe2)](){const _0x160822=_0x19ee94;return _0x160822(0xb3);}static get[_0x19ee94(0xfe)](){return!0x0;}static get[_0x19ee94(0x161)](){return!0x0;}[_0x19ee94(0x1d7)](){const _0x1d354c=_0x19ee94;this[_0x1d354c(0x1eb)]=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x1ae)),this[_0x1d354c(0xf3)]=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x1ee)),this[_0x1d354c(0x155)]=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x10e)),this[_0x1d354c(0x1b6)]=new _0x1cd0b4({'connector':this[_0x1d354c(0x1eb)]});const _0x3b4157=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x1bf));this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1df),()=>{const _0xa8704e=_0x1d354c;this[_0xa8704e(0x1b7)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x10c),(_0x5df798,_0x355d90)=>{const _0x47d0b0=_0x1d354c;this[_0x47d0b0(0x14c)]({'userMessage':_0x355d90});}),this[_0x1d354c(0x122)](_0x3b4157,_0x1d354c(0x1e6),(_0x5d4a8f,_0x4464f1)=>{const _0x3507a6=_0x1d354c;this[_0x3507a6(0x1fe)](_0x4464f1);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x205),()=>{const _0x1c0c66=_0x1d354c;_0x3b4157[_0x1c0c66(0x12f)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x149),async()=>{const _0x481135=_0x1d354c;await this[_0x481135(0x191)](),await this[_0x481135(0x194)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x15e),()=>{const _0x52b7bb=_0x1d354c;this[_0x52b7bb(0x159)]?.[_0x52b7bb(0x1db)](_0x410147(this[_0x52b7bb(0xf4)][_0x52b7bb(0x183)],_0x52b7bb(0xb4)));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x15a),(_0x5b3fba,_0x19c68c)=>{const _0x4135da=_0x1d354c;this[_0x4135da(0x159)]?.[_0x4135da(0xae)](Array[_0x4135da(0x171)](_0x19c68c));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x14a),(_0x321e39,_0x31882e)=>{const _0x4e24b2=_0x1d354c;this[_0x4e24b2(0x159)]?.[_0x4e24b2(0x14a)](_0x31882e);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1e3),(_0x330f6f,_0x2c733e)=>{const _0x18182b=_0x1d354c;this[_0x18182b(0x159)]?.[_0x18182b(0x1e3)](_0x2c733e[_0x18182b(0xe8)],_0x2c733e[_0x18182b(0x11e)]);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x173),(_0x5f0fb0,_0x4bc153)=>{const _0x7e1d7=_0x1d354c;this[_0x7e1d7(0xed)](_0x4bc153);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x126),(_0xf3baa8,_0x25afdf)=>{const _0x382362=_0x1d354c;this[_0x382362(0x159)]?.[_0x382362(0x126)](_0x25afdf[_0x382362(0x201)],_0x25afdf[_0x382362(0x134)],_0x25afdf[_0x382362(0x1a1)]);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0xd5),()=>{const _0x337d3c=_0x1d354c;this[_0x337d3c(0x13b)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1ec),()=>{const _0x43d7ef=_0x1d354c;this[_0x43d7ef(0x12e)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x12b),(_0x5eb600,_0x120a1d)=>{const _0x2782e8=_0x1d354c;this[_0x2782e8(0x159)]?.[_0x2782e8(0xbb)](_0x120a1d);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0xf6),(_0x86be21,{replyId:_0x31c67d})=>{const _0x40443b=_0x1d354c;console[_0x40443b(0x1a3)](_0x40443b(0x127),_0x31c67d);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1e1),(_0x11bf1c,{replyId:_0x3c8489})=>{const _0x4f810e=_0x1d354c;console[_0x4f810e(0x1a3)](_0x4f810e(0x189),_0x3c8489);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x170),(_0xe14a60,_0x2a278a)=>{const _0xf1b089=_0x1d354c;this[_0xf1b089(0xf4)][_0xf1b089(0xd0)][_0xf1b089(0x114)](_0xc519a1)[_0xf1b089(0x1e5)](),this[_0xf1b089(0xbf)](_0x2a278a);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1f6),(_0x292c3e,{replyId:_0x22459b,partIndex:_0x51ff43})=>{const _0x29a9d1=_0x1d354c;this[_0x29a9d1(0x165)]=this[_0x29a9d1(0xf3)][_0x29a9d1(0x1a4)],this[_0x29a9d1(0x195)](_0x22459b,_0x51ff43);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x17a),(_0x464361,{replyId:_0x497299,partIndex:_0x12da43})=>{const _0x5984af=_0x1d354c,_0x4ec9b1=this[_0x5984af(0x117)](_0x497299,_0x12da43);_0x4ec9b1&&_0x5984af(0xc4)!=_0x4ec9b1[_0x5984af(0x118)][_0x5984af(0x162)][_0x5984af(0xf8)]&&this[_0x5984af(0x155)][_0x5984af(0x19c)]([_0x4ec9b1[_0x5984af(0x118)]],_0x5984af(0x186));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x119),()=>{const _0x193dbc=_0x1d354c;this[_0x193dbc(0x155)][_0x193dbc(0xf0)](_0x193dbc(0x186));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x174),(_0x1e41e8,_0x2957fe)=>{const _0x3af4f2=_0x1d354c;this[_0x3af4f2(0xf4)][_0x3af4f2(0xd0)][_0x3af4f2(0x114)](_0xc519a1)[_0x3af4f2(0x1e5)](),this[_0x3af4f2(0x101)](_0x2957fe);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0xca),async(_0x351cf9,_0x218f3b)=>{const _0x185ee5=_0x1d354c,{reply:_0x38cfd3}=this[_0x185ee5(0x154)](_0x218f3b[_0x185ee5(0x116)]),_0x19fb03=_0xe358(this[_0x185ee5(0xf4)]),_0x3f41d2=_0x121a6f({'editor':_0x19fb03,'changeGroups':_0x38cfd3[_0x185ee5(0x128)],'documentContextContent':_0x38cfd3[_0x185ee5(0xf2)],'showDiff':_0x218f3b[_0x185ee5(0x1a4)]});await this[_0x185ee5(0xf3)][_0x185ee5(0xc6)]({'id':_0x38cfd3['id'],'parts':_0x3f41d2,'renderingStrategy':_0x185ee5(0xd9)});}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1a0),(_0x2fe401,{replyId:_0x2da844,partIndex:_0x2dfe35})=>{const _0x10597d=_0x1d354c;this[_0x10597d(0xcf)]?.[_0x10597d(0x116)]==_0x2da844&&this[_0x10597d(0xcf)]?.[_0x10597d(0x1d2)]==_0x2dfe35&&this[_0x10597d(0xf4)][_0x10597d(0xd0)][_0x10597d(0x114)](_0xc519a1)[_0x10597d(0x1e5)]();const {reply:_0x58406b}=this[_0x10597d(0x154)](_0x2da844);_0x58406b[_0x10597d(0x113)](_0x2dfe35,_0x10597d(0x204)),this[_0x10597d(0x155)][_0x10597d(0xf0)](_0x10597d(0x186));});}async[_0x19ee94(0xd1)](){const _0x10ff8a=_0x19ee94;this[_0x10ff8a(0xf4)]instanceof _0x5a2f64?this[_0x10ff8a(0x18b)](this[_0x10ff8a(0xf4)]):this[_0x10ff8a(0x122)](this[_0x10ff8a(0xf4)][_0x10ff8a(0xc3)],_0x10ff8a(0x11f),(_0x5a0488,_0x450693)=>{const _0x186ec1=_0x10ff8a;_0x450693['on'](_0x186ec1(0x14e),()=>{const _0x4add90=_0x186ec1;this[_0x4add90(0x18b)](_0x450693);});}),await this[_0x10ff8a(0x1b7)]();}[_0x19ee94(0xbf)](_0x189e9b){const _0x4e6b78=_0x19ee94,_0x3cd00e=_0xe358(this[_0x4e6b78(0xf4)]);if(!_0x3cd00e[_0x4e6b78(0xd0)][_0x4e6b78(0x1af)](_0x4e6b78(0xdf)))return;const _0x778601=this[_0x4e6b78(0xf4)][_0x4e6b78(0xd0)][_0x4e6b78(0x114)](_0x4e6b78(0x203)),{reply:_0xb04427,interaction:_0x1b2a57}=this[_0x4e6b78(0x154)](_0x189e9b[_0x4e6b78(0x116)]),_0x5b6a4c=this[_0x4e6b78(0x117)](_0x189e9b[_0x4e6b78(0x116)],_0x189e9b[_0x4e6b78(0x1d2)]),_0xbde51d=void 0x0!==_0x189e9b[_0x4e6b78(0x1d2)]?[_0xb04427[_0x4e6b78(0x128)][_0x189e9b[_0x4e6b78(0x1d2)]]]:_0xb04427[_0x4e6b78(0x128)][_0x4e6b78(0x133)](_0x240b49=>_0x4e6b78(0x10d)==_0x240b49[_0x4e6b78(0x18e)]),_0x510bce=_0xbde51d[_0x4e6b78(0xe0)](_0x392ad2=>_0xb04427[_0x4e6b78(0x128)][_0x4e6b78(0xf7)](_0x392ad2));_0x510bce[_0x4e6b78(0x1ff)](_0x537706=>_0xb04427[_0x4e6b78(0x113)](_0x537706,_0x4e6b78(0xc5)));const _0x2a1919=_0x2857f1({'editor':_0x3cd00e,'reply':_0xb04427,'interaction':_0x1b2a57,'groups':_0xbde51d,'transform':!0x0,'documentCompare':_0x778601,'documentCompareOptions':{'anchor':_0x4e6b78(0x16f),'markDeletions':!0x0}});let _0x25f559;_0x5b6a4c&&this[_0x4e6b78(0x14d)](_0x5b6a4c[_0x4e6b78(0x118)]),_0x3cd00e[_0x4e6b78(0xda)][_0x4e6b78(0xac)](_0x44db90=>{const _0x747bde=_0x4e6b78;_0x25f559=_0x44db90[_0x747bde(0x1e4)],_0x3cd00e[_0x747bde(0xd0)][_0x747bde(0x114)](_0x747bde(0xdf))[_0x747bde(0x176)](_0x2a1919),this[_0x747bde(0x155)][_0x747bde(0xf0)](_0x747bde(0x186));}),this[_0x4e6b78(0xc0)][_0x4e6b78(0xe5)](_0x25f559,{'interactionId':_0x1b2a57['id'],'replyId':_0xb04427['id'],'indexes':_0x510bce[_0x4e6b78(0x17d)]()}),this[_0x4e6b78(0x16e)](_0xb04427);}[_0x19ee94(0x101)](_0x562c64){const _0x565bf2=_0x19ee94,_0x53cfb6=_0xe358(this[_0x565bf2(0xf4)]),_0x59cf1e=this[_0x565bf2(0xf4)][_0x565bf2(0xd0)][_0x565bf2(0x114)](_0x2c7119),{reply:_0x323b49,interaction:_0x3cd19c}=this[_0x565bf2(0x154)](_0x562c64[_0x565bf2(0x116)]),_0x258ac4=this[_0x565bf2(0x117)](_0x562c64[_0x565bf2(0x116)],_0x562c64[_0x565bf2(0x1d2)]),_0x1b5820=void 0x0!==_0x562c64[_0x565bf2(0x1d2)]?[_0x323b49[_0x565bf2(0x128)][_0x562c64[_0x565bf2(0x1d2)]]]:_0x323b49[_0x565bf2(0x128)][_0x565bf2(0x133)](_0x5ec0d0=>_0x565bf2(0x10d)==_0x5ec0d0[_0x565bf2(0x18e)]),_0x48b923=_0x1b5820[_0x565bf2(0xe0)](_0x10de26=>_0x323b49[_0x565bf2(0x128)][_0x565bf2(0xf7)](_0x10de26));_0x48b923[_0x565bf2(0x1ff)](_0x416268=>_0x323b49[_0x565bf2(0x113)](_0x416268,_0x565bf2(0xc5)));const _0x39f871=_0x2857f1({'editor':_0x53cfb6,'reply':_0x323b49,'interaction':_0x3cd19c,'groups':_0x1b5820,'transform':!0x0,'documentCompare':_0x59cf1e,'documentCompareOptions':{'anchor':_0x565bf2(0x16f),'markDeletions':!0x1}});let _0x4d36b7;_0x258ac4&&this[_0x565bf2(0x14d)](_0x258ac4[_0x565bf2(0x118)]),_0x53cfb6[_0x565bf2(0xda)][_0x565bf2(0xac)](_0x1b9739=>{const _0x39f8b5=_0x565bf2;_0x4d36b7=_0x1b9739[_0x39f8b5(0x1e4)];for(const _0xcbc0ef of _0x39f871)_0xcbc0ef[_0x39f8b5(0x13a)]=_0x53cfb6[_0x39f8b5(0xda)][_0x39f8b5(0xef)][_0x39f8b5(0x1fc)],_0x1b9739[_0x39f8b5(0x1e4)][_0x39f8b5(0x153)](_0xcbc0ef),_0x53cfb6[_0x39f8b5(0xda)][_0x39f8b5(0x105)](_0xcbc0ef);}),this[_0x565bf2(0xc0)][_0x565bf2(0xe5)](_0x4d36b7,{'interactionId':_0x3cd19c['id'],'replyId':_0x323b49['id'],'indexes':_0x48b923[_0x565bf2(0x17d)]()}),this[_0x565bf2(0x16e)](_0x323b49);}[_0x19ee94(0x195)](_0x3deac4,_0x5c9e5d){const _0x2109ae=_0x19ee94,_0x50653b=_0xe358(this[_0x2109ae(0xf4)]),_0x1534a6=this[_0x2109ae(0x117)](_0x3deac4,_0x5c9e5d),_0x57d8c9=this[_0x2109ae(0xf4)][_0x2109ae(0xd0)][_0x2109ae(0x114)](_0xc519a1);if(!_0x1534a6)return void _0x57d8c9[_0x2109ae(0x1e5)]();const {range:_0x11f0d3,currentIndex:_0x1e012a,previousIndex:_0x273c05,nextIndex:_0x176315}=_0x1534a6;if(this[_0x2109ae(0xcf)]?.[_0x2109ae(0x116)]==_0x3deac4&&this[_0x2109ae(0xcf)]?.[_0x2109ae(0x1d2)]==_0x1e012a)return;this[_0x2109ae(0xcf)]={'replyId':_0x3deac4,'partIndex':_0x1e012a};const _0x229c2a=new _0x4a6bc9(_0x50653b[_0x2109ae(0x183)],{'showDiff':this[_0x2109ae(0x165)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x2109ae(0xb6)},'hideHeader':!0x0}),{reply:_0x2dadf1}=this[_0x2109ae(0x154)](_0x3deac4),_0x19d11b=_0x121a6f({'editor':_0x50653b,'changeGroups':[_0x2dadf1[_0x2109ae(0x128)][_0x1e012a]],'documentContextContent':_0x2dadf1[_0x2109ae(0xf2)],'showDiff':this[_0x2109ae(0x165)]});_0x229c2a[_0x2109ae(0x1d5)]({'parts':_0x19d11b,'renderingStrategy':_0x2109ae(0xd9)});const _0x2ce6a6=_0x1e012a!==_0x273c05;this[_0x2109ae(0x14d)](_0x11f0d3,!0x0),_0x57d8c9[_0x2109ae(0x1f9)]({'index':_0x1e012a,'title':_0x410147(this[_0x2109ae(0xf4)][_0x2109ae(0x183)],_0x2109ae(0x15c),(_0x1e012a+0x1)[_0x2109ae(0xff)]()),'icon':_0x124f51,'mainView':_0x229c2a,'showRotator':_0x2ce6a6,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x11f0d3]}),this[_0x2109ae(0xf3)][_0x2109ae(0xc2)](_0x3deac4,_0x1e012a),this[_0x2109ae(0x122)](_0x229c2a,_0x2109ae(0xca),(_0x7d066f,{showDiff:_0x48ff9a})=>{const _0x17bc43=_0x2109ae;this[_0x17bc43(0x165)]=_0x48ff9a;const {reply:_0x4d656d}=this[_0x17bc43(0x154)](_0x3deac4),_0x4d3478=_0x121a6f({'editor':_0x50653b,'changeGroups':[_0x4d656d[_0x17bc43(0x128)][_0x1e012a]],'documentContextContent':_0x4d656d[_0x17bc43(0xf2)],'showDiff':_0x48ff9a});_0x229c2a[_0x17bc43(0x1d5)]({'parts':_0x4d3478,'renderingStrategy':_0x17bc43(0xd9)});}),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x174),()=>{const _0xede9ba=_0x2109ae;this[_0xede9ba(0x101)]({'replyId':_0x3deac4,'partIndex':_0x1e012a}),_0x2ce6a6?this[_0xede9ba(0x195)](_0x3deac4,_0x176315):_0x57d8c9[_0xede9ba(0x1e5)]();}),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x170),()=>{const _0x1daab7=_0x2109ae;this[_0x1daab7(0xbf)]({'replyId':_0x3deac4,'partIndex':_0x1e012a}),_0x2ce6a6?this[_0x1daab7(0x195)](_0x3deac4,_0x176315):_0x57d8c9[_0x1daab7(0x1e5)]();}),_0x2ce6a6&&(this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0xc1),()=>{const _0x45ab28=_0x2109ae;this[_0x45ab28(0x195)](_0x3deac4,_0x176315);}),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x1cb),()=>{const _0x2113a8=_0x2109ae;this[_0x2113a8(0x195)](_0x3deac4,_0x273c05);})),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x1fa),()=>{const _0x70aea0=_0x2109ae;this[_0x70aea0(0x190)](_0x57d8c9),this[_0x70aea0(0x190)](_0x229c2a),this[_0x70aea0(0xcf)]=null;});}[_0x19ee94(0x117)](_0x3094d1,_0x4de0c6){const _0x546cb7=_0x19ee94,_0x5b4f68=_0xe358(this[_0x546cb7(0xf4)]),{reply:_0xee9a37,interaction:_0x13d0eb}=this[_0x546cb7(0x154)](_0x3094d1),_0x4d7b63=_0xee9a37[_0x546cb7(0x128)][_0x546cb7(0x133)](_0x4ca146=>_0x546cb7(0x10d)==_0x4ca146[_0x546cb7(0x18e)]),_0x2aab94=_0x4d7b63[_0x546cb7(0xe0)](_0xf8e41a=>_0xee9a37[_0x546cb7(0x128)][_0x546cb7(0xf7)](_0xf8e41a));void 0x0===_0x4de0c6&&(_0x4de0c6=_0x2aab94[0x0]);const _0x2acaeb=_0x2aab94[_0x546cb7(0xf7)](_0x4de0c6);if(-0x1==_0x2acaeb)return null;const _0x1759c0=0x0==_0x2acaeb?_0x2aab94[_0x2aab94[_0x546cb7(0x1b8)]-0x1]:_0x2aab94[_0x2acaeb-0x1],_0x4e13e2=_0x2acaeb==_0x2aab94[_0x546cb7(0x1b8)]-0x1?_0x2aab94[0x0]:_0x2aab94[_0x2acaeb+0x1],_0x109543=_0x4d7b63[_0x2acaeb],_0xe3e6ad=new _0x5e6c42([]),_0x8822ed=new _0x5e6c42([]);for(const _0x39715e of _0x109543[_0x546cb7(0xb2)])if(_0x546cb7(0xe7)!=_0x39715e[_0x546cb7(0x110)]&&_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x39715e[_0x546cb7(0x185)][_0x546cb7(0x167)](!0x0)),_0x546cb7(0x19b)!=_0x39715e[_0x546cb7(0x110)]){const _0x44713a=_0x17576e(_0x4fad0d=>_0x21da1a(_0x4fad0d,_0x546cb7(0x16a))==_0x39715e['id'],_0xee9a37[_0x546cb7(0xf2)],!0x0);_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x44713a[_0x546cb7(0x167)](!0x0));}if(0x0==_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x1b8)]){if(_0x109543[_0x546cb7(0xb2)][0x0][_0x546cb7(0x1a5)]){const _0x2ea1e7=_0x420881(_0x546cb7(0x16a),_0x109543[_0x546cb7(0xb2)][0x0][_0x546cb7(0x1a5)],_0xee9a37[_0x546cb7(0xf2)]);_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x18a)](_0x2ea1e7[_0x546cb7(0x167)](!0x0)),_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x18a)](_0x2ea1e7[_0x546cb7(0x167)](!0x0)),_0x2ea1e7[_0x546cb7(0x132)]&&(_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x2ea1e7[_0x546cb7(0x132)][_0x546cb7(0x167)](!0x0)),_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x2ea1e7[_0x546cb7(0x132)][_0x546cb7(0x167)](!0x0)));}else{const _0x43e7d5=_0xee9a37[_0x546cb7(0xf2)][_0x546cb7(0x14b)][0x0];if(!_0x43e7d5)return null;_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x43e7d5[_0x546cb7(0x167)](!0x0)),_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x43e7d5[_0x546cb7(0x167)](!0x0));}}const _0x44ea63=_0x13d0eb[_0x546cb7(0xe9)](),_0x188140=_0x5b4f68[_0x546cb7(0x1bd)][_0x546cb7(0x108)](_0x44ea63[_0x546cb7(0x1b2)]),_0x41cd1=_0x5571d8(_0xe3e6ad),_0x5cd4b0=_0x5b4f68[_0x546cb7(0x1bd)][_0x546cb7(0x108)](_0x41cd1),_0x42893e=_0x5b4f68[_0x546cb7(0x1bd)][_0x546cb7(0x108)](_0x41cd1),_0x4e90ec=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x10b)](_0x5cd4b0,0x0),_0x248ea8=_0x5571d8(_0x8822ed),_0x202d28={'anchor':_0x4e90ec,'markDeletions':!0x1},_0x593bac=_0x5b4f68[_0x546cb7(0xd0)][_0x546cb7(0x114)](_0x2c7119)[_0x546cb7(0x18f)](_0x41cd1,_0x248ea8,_0x202d28)[_0x546cb7(0x11a)]();if(!_0x593bac[_0x546cb7(0x1b8)])return null;_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xac)](_0x53709a=>{const _0xed24df=_0x546cb7;for(const _0x37c5dc of _0x593bac)if(_0xed24df(0x1e2)==_0x37c5dc[_0xed24df(0x110)]){const _0xc0f881=_0x37c5dc[_0xed24df(0x10f)],_0x5dfbb7=_0x37c5dc[_0xed24df(0x16b)],_0x992e01=new _0xcc7966(_0xc0f881,_0x5dfbb7);_0x53709a[_0xed24df(0x1e4)][_0xed24df(0x153)](_0x992e01),_0x5b4f68[_0xed24df(0xda)][_0xed24df(0x105)](_0x992e01);}else _0xed24df(0x1c1)!==_0x37c5dc[_0xed24df(0x110)]&&(_0x37c5dc[_0xed24df(0x13a)]=null,_0x37c5dc[_0xed24df(0x1bc)]=!0x1,_0x53709a[_0xed24df(0x1e4)][_0xed24df(0x153)](_0x37c5dc),_0x5b4f68[_0xed24df(0xda)][_0xed24df(0x105)](_0x37c5dc));});const _0x316aa9=_0x2f69f3(_0x5b4f68,_0x593bac,_0x5cd4b0);_0x58915b(_0x5b4f68[_0x546cb7(0xda)],_0x316aa9);const _0x295897=_0x316aa9[_0x546cb7(0xcc)]()[_0x546cb7(0x140)][_0x546cb7(0x11b)][_0x546cb7(0x17d)](),_0x1753da=_0x316aa9[_0x546cb7(0xcc)]()[_0x546cb7(0x184)][_0x546cb7(0x11b)][_0x546cb7(0x17d)](),_0x295641=[];let _0xca84c0=_0x5cd4b0,_0x4b4f83=_0x42893e;for(let _0x173915=0x0;_0x173915<_0x1753da[_0x546cb7(0x1b8)];_0x173915++){const _0x3b9a01=_0xca84c0[_0x546cb7(0x131)]-_0x1753da[_0x173915];_0x295641[_0x173915]=_0x4b4f83[_0x546cb7(0x131)]-_0x3b9a01,_0xca84c0=_0xca84c0[_0x546cb7(0x1d1)](_0x1753da[_0x173915]),_0x4b4f83=_0x4b4f83[_0x546cb7(0x1d1)](_0x295641[_0x173915]);}const _0x144b9f=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1c3)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x42893e,_0x295897),_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x42893e,_0x295641)),_0x5976a6=_0x42893e[_0x546cb7(0x166)](0x0)[_0x546cb7(0x1a9)](_0x2adcc9),_0x41c8ac=Array[_0x546cb7(0x171)](_0x188140[_0x546cb7(0x1e9)]())[_0x546cb7(0x1dc)](_0x3dc477=>_0x3dc477[_0x546cb7(0x1a9)](_0x2adcc9)==_0x5976a6)[_0x546cb7(0x144)](),_0x1efd47=_0x144b9f[_0x546cb7(0x140)][_0x546cb7(0x11b)][_0x546cb7(0x17d)](),_0x1d8489=_0x144b9f[_0x546cb7(0x184)][_0x546cb7(0x11b)][_0x546cb7(0x17d)]();_0x1efd47[0x0]=_0x41c8ac[0x0]+_0x1efd47[0x0],_0x1d8489[0x0]=_0x41c8ac[0x0]+_0x1d8489[0x0];let _0x5d6306=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1c3)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xef)][_0x546cb7(0x169)](),_0x1efd47),_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xef)][_0x546cb7(0x169)](),_0x1d8489));const _0x303e02=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xef)][_0x546cb7(0x125)][_0x546cb7(0x11a)](_0x44ea63[_0x546cb7(0x1fc)]);for(const _0xdfdc56 of _0x303e02)_0x5d6306=_0x2e571f[_0x546cb7(0x15b)](_0x5d6306[_0x546cb7(0x200)](_0xdfdc56));return{'range':_0x5d6306,'previousIndex':_0x1759c0,'nextIndex':_0x4e13e2,'currentIndex':_0x4de0c6};}[_0x19ee94(0x18b)](_0xe936ed){const _0xc7656=_0x19ee94;if(!_0xe936ed[_0xc7656(0xd0)][_0xc7656(0x1af)](_0xc7656(0x19e)))return;const _0x4e57f9=_0xe936ed[_0xc7656(0x1d3)][_0xc7656(0x114)](_0xc7656(0x12d)),_0x2117ea=_0xe936ed[_0xc7656(0x1d3)][_0xc7656(0x114)](_0xc7656(0xf5));this[_0xc7656(0x122)](_0x4e57f9,_0xc7656(0x142),(_0x5d2583,_0x830021,_0x3f0dc3)=>{const _0x6d8cba=_0xc7656,_0x3103b3=this[_0x6d8cba(0xc0)][_0x6d8cba(0x114)](_0x830021);if(!_0x3103b3)return;const _0x50ae7a=this[_0x6d8cba(0x159)][_0x6d8cba(0x15f)](_0x3103b3[_0x6d8cba(0x1be)])[_0x6d8cba(0x145)](_0x3103b3[_0x6d8cba(0x116)]);_0x3103b3[_0x6d8cba(0x138)][_0x6d8cba(0x1ff)](_0xe14b4=>_0x50ae7a[_0x6d8cba(0x113)](_0xe14b4,_0x6d8cba(0x10d))),this[_0x6d8cba(0xc0)][_0x6d8cba(0x1aa)](_0x830021),this[_0x6d8cba(0xc0)][_0x6d8cba(0xe5)](_0x3f0dc3,_0x3103b3);}),this[_0xc7656(0x122)](_0x2117ea,_0xc7656(0x142),(_0xe2036c,_0xb6c1f,_0x25dbd5)=>{const _0xd85094=_0xc7656,_0x208a72=this[_0xd85094(0xc0)][_0xd85094(0x114)](_0xb6c1f);if(!_0x208a72)return;const _0x38dc8b=this[_0xd85094(0x159)][_0xd85094(0x15f)](_0x208a72[_0xd85094(0x1be)])[_0xd85094(0x145)](_0x208a72[_0xd85094(0x116)]);_0x208a72[_0xd85094(0x138)][_0xd85094(0x1ff)](_0x269230=>_0x38dc8b[_0xd85094(0x113)](_0x269230,_0xd85094(0xc5))),this[_0xd85094(0xc0)][_0xd85094(0x1aa)](_0xb6c1f),this[_0xd85094(0xc0)][_0xd85094(0xe5)](_0x25dbd5,_0x208a72);});}async[_0x19ee94(0x1fb)](_0xdd5a12){const _0x214101=_0x19ee94;this[_0x214101(0xf4)][_0x214101(0xd0)][_0x214101(0x114)](_0xc519a1)[_0x214101(0x1e5)](),this[_0x214101(0xf3)][_0x214101(0x120)](_0x214101(0xd9)),this[_0x214101(0xf3)][_0x214101(0x112)](!0x0),await this[_0x214101(0x191)]();try{const _0x4cb14c=this[_0x214101(0xf4)][_0x214101(0xd0)][_0x214101(0x114)](_0x351dd5);this[_0x214101(0x1b5)]('\x20'),_0x4cb14c[_0x214101(0x107)][_0x214101(0x1e7)](_0x214101(0x1ea)),await this[_0x214101(0x1b7)](_0xdd5a12);const {sessionId:_0x3f341e}=this[_0x214101(0x155)][_0x214101(0xe1)]();await this[_0x214101(0x159)][_0x214101(0x197)](_0xdd5a12,_0x3f341e),this[_0x214101(0x159)][_0x214101(0x135)]()&&this[_0x214101(0x159)][_0x214101(0x1db)](_0x410147(this[_0x214101(0xf4)][_0x214101(0x183)],_0x214101(0xb4)));}catch(_0x324021){console[_0x214101(0xce)](_0x214101(0x146),_0x324021);}finally{this[_0x214101(0xf3)][_0x214101(0x120)](_0x214101(0xde)),this[_0x214101(0xf3)][_0x214101(0x112)](!0x1);}}[_0x19ee94(0x1ac)](_0x204472){const _0x227533=_0x19ee94;this[_0x227533(0x159)]['id']===_0x204472&&this[_0x227533(0x1b7)]();}async[_0x19ee94(0x1cd)](){const _0x1762c8=_0x19ee94,_0xba676a=this[_0x1762c8(0x155)][_0x1762c8(0x17f)]();this[_0x1762c8(0x159)]?.[_0x1762c8(0x19a)](_0xba676a),this[_0x1762c8(0x159)]?.[_0x1762c8(0x1db)](_0x410147(this[_0x1762c8(0xf4)][_0x1762c8(0x183)],_0x1762c8(0xb4)));}[_0x19ee94(0x11d)](){const _0x10ccc6=_0x19ee94;this[_0x10ccc6(0x159)]?.[_0x10ccc6(0x1c9)]();}[_0x19ee94(0xea)](){const _0xbcc32=_0x19ee94;this[_0xbcc32(0xf3)][_0xbcc32(0xea)]();}async[_0x19ee94(0x1df)](){const _0xc3ccb3=_0x19ee94;await this[_0xc3ccb3(0x1b7)]();}async[_0x19ee94(0x182)]({message:_0x87bf75,quickActionData:_0x3932b1}){const _0x299586=_0x19ee94;await this[_0x299586(0x14c)]({'userMessage':_0x87bf75,'quickActionData':_0x3932b1});}[_0x19ee94(0x1bb)](){const _0x540bd6=_0x19ee94,_0x13ecf8=this[_0x540bd6(0xf4)][_0x540bd6(0x1a6)][_0x540bd6(0x114)](_0x540bd6(0x196));if(!_0x13ecf8)throw new _0x555cfc(_0x540bd6(0x178),this);return _0x13ecf8;}async[_0x19ee94(0x1b7)](_0x98e2e1){const _0x495fdb=_0x19ee94;try{this[_0x495fdb(0xf3)][_0x495fdb(0x1ba)](),await this[_0x495fdb(0x1b3)](_0x98e2e1);}catch(_0x4ef654){_0x322e37(_0x495fdb(0x1e8),_0x4ef654),this[_0x495fdb(0x159)]=void 0x0,this[_0x495fdb(0xf3)][_0x495fdb(0x163)]();}}async[_0x19ee94(0x1b3)](_0x3f8efe){const _0x1c5d79=_0x19ee94,_0x31f967=this[_0x1c5d79(0xf4)][_0x1c5d79(0xd0)][_0x1c5d79(0x114)](_0xc519a1);let _0x95ba5;_0x31f967[_0x1c5d79(0x130)]&&_0x31f967[_0x1c5d79(0x1e5)](),_0x95ba5=_0x3f8efe||!this[_0x1c5d79(0x159)]?this[_0x1c5d79(0xf4)][_0x1c5d79(0x1a6)][_0x1c5d79(0x114)](_0x1c5d79(0x188)):this[_0x1c5d79(0x159)][_0x1c5d79(0x1b4)]['id'],await this[_0x1c5d79(0x191)]();const _0x14e99f=this[_0x1c5d79(0x1bb)](),_0x4cb184=_0x3f8efe||_0x1dc6c9();this[_0x1c5d79(0x159)]=new _0x3aaab2({'connector':this[_0x1c5d79(0x1eb)],'chatModels':this[_0x1c5d79(0x1b6)],'defaultModelId':_0x95ba5,'conversationId':_0x4cb184,'group':_0x14e99f,'getEditor':()=>_0xe358(this[_0x1c5d79(0xf4)])}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x16c),(_0x5edc99,_0x15bc18)=>{const _0x2bd622=_0x1c5d79;_0x15bc18[_0x2bd622(0x1a7)]=this[_0x2bd622(0x104)](_0x15bc18[_0x2bd622(0x1a7)],this[_0x2bd622(0xf4)][_0x2bd622(0x1a6)][_0x2bd622(0x114)](_0x2bd622(0x148))),this[_0x2bd622(0xf3)][_0x2bd622(0x187)](_0x15bc18),this[_0x2bd622(0xf3)][_0x2bd622(0x181)](),this[_0x2bd622(0xf3)][_0x2bd622(0xd6)](),this[_0x2bd622(0xf3)][_0x2bd622(0x109)](),_0x3f8efe||(this[_0x2bd622(0xf3)][_0x2bd622(0xcb)](),this[_0x2bd622(0x159)]?.[_0x2bd622(0x1db)](_0x410147(this[_0x2bd622(0xf4)][_0x2bd622(0x183)],_0x2bd622(0xb4))));}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f3),(_0x5c179b,_0x5107fe)=>{const _0x376850=_0x1c5d79;this[_0x376850(0xf3)][_0x376850(0x143)](_0x5107fe[_0x376850(0x1f1)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xc9),(_0x1c7d06,_0xb1c7f3)=>{const _0x201e90=_0x1c5d79;this[_0x201e90(0xf3)][_0x201e90(0x1b0)](_0xb1c7f3);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x141),()=>{const _0x4a3db6=_0x1c5d79;this[_0x4a3db6(0xf3)][_0x4a3db6(0xbc)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f5),()=>{const _0x1cad05=_0x1c5d79;this[_0x1cad05(0xf3)][_0x1cad05(0xbc)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f7),(_0x171174,_0x5c55bc)=>{const _0x388f9d=_0x1c5d79;this[_0x388f9d(0xf3)][_0x388f9d(0xaf)](_0x5c55bc,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xdc),(_0x18ac3c,_0x25947b)=>{const _0x322a96=_0x1c5d79;this[_0x322a96(0xf3)][_0x322a96(0xaf)](_0x25947b,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xf1),()=>{const _0x2d3dea=_0x1c5d79;this[_0x2d3dea(0xf3)][_0x2d3dea(0x123)]();}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1d4),async()=>{const _0xc53017=_0x1c5d79;await this[_0xc53017(0xf3)][_0xc53017(0x193)]();}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x11c),(_0x3d049b,_0x18e419)=>{const _0x35c28d=_0x1c5d79;this[_0x35c28d(0xf3)][_0x35c28d(0xd8)](_0x18e419['id']);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x17e),(_0x1b53f8,_0x1ab49e,_0x343d54)=>{const _0x2cc842=_0x1c5d79;this[_0x2cc842(0x1b5)](_0x1ab49e,_0x343d54);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x102),(_0x1629bc,_0x2d94b6)=>{const _0xb7bd75=_0x1c5d79;_0xb7bd75(0xad)===_0x2d94b6[_0xb7bd75(0x110)]?this[_0xb7bd75(0xf3)][_0xb7bd75(0x1d0)](_0x2d94b6):this[_0xb7bd75(0xf3)][_0xb7bd75(0xd7)](_0x2d94b6);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xdb),async(_0x1f8ecd,_0x2dd1dc,_0x34ecc0)=>{const _0x5af4f3=_0x1c5d79;await this[_0x5af4f3(0xfc)]({'reply':_0x2dd1dc,'changeGroups':_0x34ecc0});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x17c),(_0x244b1b,{reply:_0x183280,index:_0xcacf84,state:_0x8d9950})=>{const _0x2a95bc=_0x1c5d79;this[_0x2a95bc(0xf3)][_0x2a95bc(0x1f2)]({'id':_0x183280['id'],'index':_0xcacf84,'state':_0x8d9950});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1ca),(_0x28864e,_0x1ba5de)=>{const _0x5398c5=_0x1c5d79;if(this[_0x5398c5(0xf3)][_0x5398c5(0x1ab)](_0x1ba5de[_0x5398c5(0x1b1)],_0x1ba5de[_0x5398c5(0x1ed)]),_0x5398c5(0x1d8)===_0x1ba5de[_0x5398c5(0x1b1)][_0x5398c5(0x110)]){const _0x51ebe0=[..._0xe358(this[_0x5398c5(0xf4)])[_0x5398c5(0xda)][_0x5398c5(0xef)][_0x5398c5(0x1d8)][_0x5398c5(0x180)]()];this[_0x5398c5(0x155)][_0x5398c5(0x19c)](_0x51ebe0,_0x5398c5(0x103)+this[_0x5398c5(0x159)]?.['id']);}}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x106),(_0x377fed,_0x2595e2)=>{const _0x4aa88e=_0x1c5d79;this[_0x4aa88e(0xf3)][_0x4aa88e(0x173)](_0x2595e2[_0x4aa88e(0xb5)]),_0x4aa88e(0x1da)==_0x2595e2[_0x4aa88e(0xb5)]&&this[_0x4aa88e(0x11d)](),_0x4aa88e(0x1d8)===_0x2595e2[_0x4aa88e(0x110)]&&this[_0x4aa88e(0x155)][_0x4aa88e(0xf0)](_0x4aa88e(0x103)+this[_0x4aa88e(0x159)]?.['id']);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x158),(_0x19b9c9,_0xd3a4f)=>{const _0xa56bfb=_0x1c5d79;this[_0xa56bfb(0xf3)][_0xa56bfb(0xd3)](_0xd3a4f[_0xa56bfb(0x1b1)][_0xa56bfb(0xb5)],_0xd3a4f[_0xa56bfb(0x1ed)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1a8),(_0x21f0d6,_0x28743a)=>{const _0x5b627c=_0x1c5d79;this[_0x5b627c(0xf3)][_0x5b627c(0x164)](_0x28743a[_0x5b627c(0x157)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xc7),(_0x461f0d,_0x113ecf)=>{const _0x44db50=_0x1c5d79;this[_0x44db50(0xf3)][_0x44db50(0x1ef)](_0x113ecf[_0x44db50(0xfd)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1c8),(_0x341f85,_0x2b876e)=>{const _0x44d0da=_0x1c5d79;this[_0x44d0da(0xf3)][_0x44d0da(0x1e0)](_0x2b876e[_0x44d0da(0x201)],_0x2b876e[_0x44d0da(0xe8)],_0x2b876e[_0x44d0da(0x198)],_0x2b876e[_0x44d0da(0x1a1)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xb0),(_0x4f7f4e,_0x45667d)=>{const _0x49fcd0=_0x1c5d79;this[_0x49fcd0(0xf3)][_0x49fcd0(0xb8)](_0x45667d[_0x49fcd0(0x201)],_0x45667d[_0x49fcd0(0x199)],_0x45667d[_0x49fcd0(0x1dd)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x14f),(_0x30ba25,_0x480f0f)=>{const _0x12c6df=_0x1c5d79;this[_0x12c6df(0xf3)][_0x12c6df(0x13d)](_0x480f0f);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f4),(_0x8b05a6,_0x3a42f7)=>{const _0x3e7cf3=_0x1c5d79;this[_0x3e7cf3(0xf3)][_0x3e7cf3(0xe3)](_0x3a42f7[_0x3e7cf3(0x1b4)],_0x3a42f7[_0x3e7cf3(0x13c)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xce),(_0x31b6e3,{error:_0x1615a7,interactionId:_0x34f759,fileName:_0x58302a,url:_0x457069,sourceId:_0x12e647,sourceLabel:_0x1e09c6})=>{const _0x56ee44=_0x1c5d79,_0x2f692e=_0x34f759?_0x34f759+':'+_0x1dc6c9():_0x1dc6c9();_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x13f))?this[_0x56ee44(0xf3)][_0x56ee44(0xcd)]({'staticMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x18c)),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0xf9))||_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x1e8))?(this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0xfa)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7)):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x18d))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x192),_0x58302a),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x1cf))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0xdd),_0x457069),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x124))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x177)),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x115))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x121)),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x168))?(_0x12e647&&this[_0x56ee44(0xf3)][_0x56ee44(0xeb)](_0x12e647),this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x1a2),_0x1e09c6||_0x56ee44(0xe8)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7)):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0xd4))?(this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x1c5)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7)):(this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x202)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7));}),await this[_0x1c5d79(0x159)][_0x1c5d79(0x1d7)](this[_0x1c5d79(0xf4)][_0x1c5d79(0x1a6)][_0x1c5d79(0x114)](_0x1c5d79(0x151))),_0x3f8efe||await this[_0x1c5d79(0x159)][_0x1c5d79(0x140)]();}async[_0x19ee94(0x14c)]({userMessage:_0xabc6a9,quickActionData:_0x5f57d3}){const _0x3ef7a9=_0x19ee94;if(!this[_0x3ef7a9(0x159)])throw new _0x555cfc(_0x3ef7a9(0x160));this[_0x3ef7a9(0x159)][_0x3ef7a9(0xc8)]()&&await this[_0x3ef7a9(0x159)][_0x3ef7a9(0xe6)](this[_0x3ef7a9(0x155)][_0x3ef7a9(0xe1)]()),this[_0x3ef7a9(0x159)]['id']&&this[_0x3ef7a9(0x159)][_0x3ef7a9(0xe4)]&&await this[_0x3ef7a9(0x159)][_0x3ef7a9(0xba)]({'userMessage':_0xabc6a9,'quickActionData':_0x5f57d3}),this[_0x3ef7a9(0xec)]();}[_0x19ee94(0xec)](){const _0x52d23a=_0x19ee94,_0x3fe8a8=_0xe358(this[_0x52d23a(0xf4)])[_0x52d23a(0xda)],_0x1abc0a=Array[_0x52d23a(0x171)](_0x3fe8a8[_0x52d23a(0x129)][_0x52d23a(0x1cc)](_0x2d0105));_0x3fe8a8[_0x52d23a(0xac)](_0x2abfd8=>{const _0xe36fc0=_0x52d23a;_0x1abc0a[_0xe36fc0(0x1ff)](_0x2dd824=>_0x2abfd8[_0xe36fc0(0x137)](_0x2dd824));});}[_0x19ee94(0x19f)](){const _0x4f6cc0=_0x19ee94;console[_0x4f6cc0(0x1a3)](_0x4f6cc0(0x15d));}[_0x19ee94(0x1fe)](_0x56892c){const _0x10982e=_0x19ee94;this[_0x10982e(0xf3)][_0x10982e(0x147)](_0x56892c);}[_0x19ee94(0xbd)](_0x452e88){const _0x2556d7=_0x19ee94;_0x322e37(_0x452e88[_0x2556d7(0x1c6)]);}[_0x19ee94(0xed)](_0x48afc0){const _0x16bea1=_0x19ee94;this[_0x16bea1(0x159)]?.[_0x16bea1(0x10a)](_0x48afc0);}[_0x19ee94(0x13b)](){const _0x18c3bd=_0x19ee94;this[_0x18c3bd(0x159)]?.[_0x18c3bd(0xd5)]();}[_0x19ee94(0x12e)](){const _0x4319b6=_0x19ee94;this[_0x4319b6(0x159)]?.[_0x4319b6(0x1ec)]();}[_0x19ee94(0x154)](_0x4c1cbd){const _0x574b36=_0x19ee94,[_0x132851,_0x18af95]=_0x4c1cbd[_0x574b36(0xbe)](':'),_0x23dd87=this[_0x574b36(0x159)][_0x574b36(0x15f)](_0x132851),_0x221888=_0x23dd87[_0x574b36(0x145)](_0x18af95);return{'interaction':_0x23dd87,'reply':_0x221888};}[_0x19ee94(0x14d)](_0x428864,_0x1f31d0=!0x1){const _0x3aa614=_0x19ee94,_0x55fe0b=_0xe358(this[_0x3aa614(0xf4)]),_0x33e8b2={'target':_0x55fe0b[_0x3aa614(0x16d)][_0x3aa614(0x107)][_0x3aa614(0x1c2)][_0x3aa614(0x100)](_0x55fe0b[_0x3aa614(0x16d)][_0x3aa614(0x13e)][_0x3aa614(0x139)](_0x428864)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1f31d0};_0x1f31d0&&(_0x33e8b2[_0x3aa614(0x136)]=!0x0),_0x360cfb(_0x33e8b2);}[_0x19ee94(0x1b5)](_0x41da20,_0x795a4b=!0x1){const _0x3afe3b=_0x19ee94;this[_0x3afe3b(0xf3)][_0x3afe3b(0x17e)](_0x41da20||_0x410147(this[_0x3afe3b(0xf4)][_0x3afe3b(0x183)],_0x3afe3b(0x1fd)),_0x795a4b);}[_0x19ee94(0x104)](_0x3b7817,_0x56f45b){const _0x3ce1a7=_0x19ee94;let _0x2fe763;if(_0x56f45b){_0x2fe763=[];const _0x212a8a=_0x3ce1a7(0x1f8)==typeof _0x56f45b?[_0x56f45b[_0x3ce1a7(0x1d9)]()]:_0x56f45b[_0x3ce1a7(0xe0)](_0x4e1fa2=>_0x4e1fa2[_0x3ce1a7(0x1d9)]());for(const _0x222010 of _0x212a8a)for(const _0xc5541f of _0x3b7817)(_0xc5541f['id'][_0x3ce1a7(0x1d9)]()===_0x222010||_0xc5541f[_0x3ce1a7(0xee)][_0x3ce1a7(0x1d9)]()===_0x222010||_0xc5541f[_0x3ce1a7(0x1b9)][_0x3ce1a7(0x1d9)]()===_0x222010||_0xc5541f['id'][_0x3ce1a7(0x1d9)]()[_0x3ce1a7(0x12a)](_0x222010))&&_0x2fe763[_0x3ce1a7(0x156)](_0xc5541f);}else _0x2fe763=_0x3b7817;return _0x2fe763;}async[_0x19ee94(0xfc)]({reply:_0x52d04d,changeGroups:_0x4e2f80,renderingStrategy:_0x384d3c}){const _0x5b6e6c=_0x19ee94,{id:_0xded5f,isDone:_0x1e6c1a,type:_0xa2ce48,parsedContent:_0x174c07}=_0x52d04d;if(_0x5b6e6c(0x12c)===_0xa2ce48){const _0x386c09=_0xe358(this[_0x5b6e6c(0xf4)]),_0x51c92f=_0x121a6f({'editor':_0x386c09,'showDiff':this[_0x5b6e6c(0xf3)][_0x5b6e6c(0x1a4)],'changeGroups':_0x4e2f80,'documentContextContent':_0x52d04d[_0x5b6e6c(0xf2)]});await this[_0x5b6e6c(0xf3)][_0x5b6e6c(0xc6)]({'id':_0xded5f,'parts':_0x51c92f,'renderingStrategy':_0x384d3c,'isDone':_0x1e6c1a});}else _0x5b6e6c(0xad)===_0xa2ce48&&await this[_0x5b6e6c(0xf3)][_0x5b6e6c(0x1c7)]({'id':_0xded5f,'parsedContent':_0x174c07,'renderingStrategy':_0x384d3c,'isDone':_0x1e6c1a});_0x1e6c1a&&_0x52d04d[_0x5b6e6c(0x1f0)][_0x5b6e6c(0x1b8)]>0x0&&this[_0x5b6e6c(0xf3)][_0x5b6e6c(0x1c4)](_0xded5f,_0x52d04d[_0x5b6e6c(0x1f0)]);}async[_0x19ee94(0x191)](){const _0x25618c=_0x19ee94,_0x34aa38=this[_0x25618c(0x159)]?.[_0x25618c(0x1ad)];_0x34aa38&&(_0x34aa38[_0x25618c(0x111)](),this[_0x25618c(0xf3)][_0x25618c(0x172)](_0x34aa38));}async[_0x19ee94(0x194)](){const _0xd279e3=_0x19ee94,_0x2355a7=this[_0xd279e3(0x159)]?.[_0xd279e3(0x1ad)];if(_0x2355a7){for await(const _0x23e0ea of _0x2355a7[_0xd279e3(0x179)])await this[_0xd279e3(0xfc)]({'reply':_0x23e0ea,'changeGroups':_0x23e0ea[_0xd279e3(0x128)],'renderingStrategy':_0xd279e3(0xd9)});}}[_0x19ee94(0x16e)](_0x57afcb){const _0x4a7fee=_0x19ee94,_0x1385c9={'positiveCount':_0x57afcb[_0x4a7fee(0x128)][_0x4a7fee(0x133)](_0x4e5497=>_0x4a7fee(0xc5)===_0x4e5497[_0x4a7fee(0x18e)])[_0x4a7fee(0x1b8)],'totalCount':_0x57afcb[_0x4a7fee(0x128)][_0x4a7fee(0x1b8)]},_0x2e4a32=this[_0x4a7fee(0x159)][_0x4a7fee(0x15f)](_0x57afcb[_0x4a7fee(0x1be)])[_0x4a7fee(0x152)];this[_0x4a7fee(0x1eb)][_0x4a7fee(0x1d6)](this[_0x4a7fee(0x159)]['id'],_0x2e4a32,_0x1385c9);}}
|
|
23
|
+
const _0x555e54=_0x1725;(function(_0x273f78,_0x120c5d){const _0x19a427=_0x1725,_0x470d9d=_0x273f78();while(!![]){try{const _0x4b285a=parseInt(_0x19a427(0x6e))/0x1+parseInt(_0x19a427(0xbd))/0x2+parseInt(_0x19a427(0xbf))/0x3*(parseInt(_0x19a427(0x181))/0x4)+-parseInt(_0x19a427(0x18b))/0x5*(-parseInt(_0x19a427(0x1a7))/0x6)+-parseInt(_0x19a427(0x169))/0x7*(parseInt(_0x19a427(0x120))/0x8)+parseInt(_0x19a427(0x91))/0x9+-parseInt(_0x19a427(0x80))/0xa;if(_0x4b285a===_0x120c5d)break;else _0x470d9d['push'](_0x470d9d['shift']());}catch(_0x2512e5){_0x470d9d['push'](_0x470d9d['shift']());}}}(_0x1a9f,0xf2f1c));import{ContextPlugin as _0x11e54c,Editor as _0xf79b2d}from'ckeditor5/src/core.js';function _0x1725(_0x5502f9,_0x68972f){const _0x1a9f2a=_0x1a9f();return _0x1725=function(_0x17254b,_0x3c43f8){_0x17254b=_0x17254b-0x6b;let _0x1992d0=_0x1a9f2a[_0x17254b];return _0x1992d0;},_0x1725(_0x5502f9,_0x68972f);}import{CKEditorError as _0x2db741,logError as _0x224fdf,scrollViewportToShowTarget as _0x3a00cc,uid as _0x1748d5}from'ckeditor5/src/utils.js';import{AIConnector as _0x23a5c2}from'../aicore/aiconnector.js';import{AITabs as _0x2efbc4}from'../aitabs/aitabs.js';import{AIChatConversation as _0x12da7f}from'./model/aichatconversation.js';import{getTranslation as _0xe1cad0}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x51d958}from'../aicore/aiediting.js';import{AIChatModels as _0x241b19}from'./model/aichatmodels.js';import{getEditorFromContext as _0x41f855}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x21cae1,DATA_ID_MODEL_ATTRIBUTE as _0x1d2c17}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x14293f}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x18ef92,getMinimalSelection as _0xa78144,getSuggestionPartsFromReply as _0x31c5f2}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x2f7680,_DetachOperation as _0x3d2d1f}from'ckeditor5/src/engine.js';function _0x1a9f(){const _0x596232=['20656180kGusyd','push','updateFeedItemAIReplySources','view','change','commands','startInteraction','clearConversationContextUI','AI_CHAT_GENERIC_ERROR','Undo','isDocumentOperation','_previewedChangeGroup','getChildren','changes','isCurrentDocumentInContext','text-delta','indexes','6549921nQkqvD','ai-chat-file-upload-failed','dialogClosed','sendUserMessage','isUploadInProgress','resource','stop','updateFeedItemAIReplySuggestionPartState','contextItem','focusPromptInput','setSelectedModel','isDisabled','baseVersion','sourceResourcesLoaded','root','contextSent','webSearchFinished','_createFromRanges','insertSuggestion','_applyOperationsAsSuggestions','getRanges','replies','remove','ai-chat-controller-no-active-conversation','isInContext','ai.chat.context','getAttribute','setAddContextOptions','addDocumentToContext','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','model','maxOffset','removeMarker','config','removed','addFeedItemAIReply','sendMessage','resizedTabs','resize','removeFeedInteraction','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','replyId','reasoningStarted','upsertAIChatRating','1472620lLAcnc','contextItemAdded','36483dFphxP','replyContentUpdated','_batchToChanges','selection','documentContextContent','_openBalloonFor','enableControls','changeGroups','rejectSuggestion','ai-chat-context-invalid-data','type','updateContent','contextItems','editing','ai-chat-source-resources-load-failed','activateTab','addSelectionToChatContext','sourcePosition','$graveyard','_aiEditing','interactionStarted','AI_CHAT_ABORTED_MESSAGE','cloneNode','new','isOfficialPlugin','updateFeedItemAIReplyContent','find','replyChangeGroupStateUpdated','Showing\x20conversation\x20history...','_aiChatUi','AI_CHAT_UNTITLED_CONVERSATION','_flushLastInteractionUI','partIndex','_aiConnector','ai.chat.models.displayedModels','getGroupId','addFilesToContext','content','marker','addOperation','batch','context','mapper','disableControls','add','resourceStateChanged','ai-chat-controller-mouse-over','addFeedItemStaticMessage','handleUserInteraction','toggleSuggestionDisplayMode','indexOf','AI_BALLOON_HEADER_TITLE','AIConnector','loadConversation','load','toViewRange','history','viewRangeToDom','_updateRatings','showNext','_handleUIUserMessage','getMarkersGroup','createRange','error','getChildAtOffset','getRoot','clearPendingContextUI','unshift','path','toString','version','updateCapabilities','createPositionFromPath','isPremiumPlugin','locale','contextItemRemoved','get','interactionDestroyed','resetConversationTitle','setConversationContext','delete','rootName','addContextItem','revert','log','split','toggleReasoning','howMany','_integrateEditor','node','getTransformedByOperation','ready','dislike','capabilitiesUpdated','setChangeGroupState','data','ai-chat-resource-load-failed','573080oNmJiS','DocumentCompare','conversationInitialized','parse','addSelectionToContext','removeFromContext','resources','message','addFeedItemAISuggestion','rejected','_setIsMaximized','AIChatController','startConversation','streaming','getInteractionAndReplyById','static','closeSourceResourceBalloon','removeSelectionFromChatContext','selectModel','_toggleReasoning','ai-chat-url-upload-failed','main','removeContextItem','setContextItemLoading','showChangeInText','anchorId','getChild','setFeedItemRenderingStrategy','showPrevious','data-id','addUrlToContext','handleRemovedConversation','setModel','resizeTabs','isLoading','lastInteraction','modelSelected','scrollFeedToSuggestion','markers','addCurrentDocumentToContext','ai-request-aborted','pluginName','slice','toggleLoadingSkeleton','getDocumentContext','undo','AITabs','alignToTop','requires','afterInit','collaboration.channelId','setConversationTitle','activeConversation','accepted','_getDocumentRangeForReplyChanges','mouseLeaveSuggestion','updateFeedItemAIReplySuggestionContent','AIChatUI','toggleWebSearch','close','from','getDiff','source','ai-conversation-','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','current-document','init','_showConversationHistory','showDiff','selectedModel','getOperations','TrackChangesEditing','query','91PvTCLv','pending','loadSourceResources','_handleStartConversation','_startConversationSafely','AIEditing','startsWith','state','Failed\x20to\x20load\x20conversation','interactionCreated','domConverter','createConversation','ai-chat-missing-channel-id','setLoadingMessage','replyCreated','getPath','finishInteraction','removeSelectionFromContext','getFirstRange','contextItemLoadingEnded','_updateReplyContent','full','applySuggestion','_stopLastInteraction','580EXuEGA','set','hideFakeVisualSelection','_insertSuggestion','uid','isOpen','_balloonShowDiff','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','abortPromptStream','showFakeVisualSelection','87590kaMFYi','_scrollToSuggestionRange','children','length','resetMessageInput','reasoningFinished','open','editors','applyOperation','addContextOptionsChanged','_removeFromContext','stopListening','map','options','uiId','nextSibling','start','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','filter','document','ai-chat-conversation-start-failed','stopInteraction','_aiChatModels','Liked\x20response','updateResourceState','AI_CHAT_RESOURCE_LOAD_FAILED','plugins','chat','252IEkVzf','getReply','webSearchStarted','redo','AI_CHAT_CONTEXT_INVALID_DATA','mouseOverSuggestion','Disliked\x20response','addResourceToContext','listenTo','messageId','setIsUploadInProgress','addFileToContext','ai-chat-context-unsupported-type','AI_CHAT_UNABLE_TO_START_CONVERSATION','updateCurrentDocumentInContext','sources','outdated','isCurrentDocumentInConversation','interactionId','_toggleWebSearch','sourceId','setIsMaximized','range','getSelectionText','interactionFinished','resourceId','createPositionAt','addFeedInteractionHeader','populateSourceResourceBalloon','isStarted','28793IFFbsP','_removeAISelectionMarkers','end','modification-delta','isModelAvailable','ai-chat-conversation-init-failed','_applySuggestion','updateConversationTitle','forEach','_logError','addFeedItemUserMessage','uploadProgressChanged','getInteraction','has','ai.chat.models.defaultModelId','getDocumentData','like','addFeedItemError'];_0x1a9f=function(){return _0x596232;};return _0x1a9f();}import{findOne as _0x34ca8c,getAttribute as _0x2600da,serialize as _0x11046c,Document as _0x376fef,findByAttribute as _0x39a0ed}from'../aicore/utils/htmlparser.js';import{IconAI as _0x2cf943}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x49ed11}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x335532}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x11e54c{[_0x555e54(0xd2)];[_0x555e54(0xe0)];[_0x555e54(0xdc)];[_0x555e54(0x1a1)];[_0x555e54(0xc1)]=new Map();[_0x555e54(0x8b)]=null;[_0x555e54(0x187)]=!0x1;static get[_0x555e54(0x150)](){return[_0x23a5c2,_0x335532,_0x21cae1];}static get[_0x555e54(0x149)](){const _0x1dcf17=_0x555e54;return _0x1dcf17(0x12b);}static get[_0x555e54(0xd7)](){return!0x0;}static get[_0x555e54(0x108)](){return!0x0;}[_0x555e54(0x162)](){const _0x4c87a2=_0x555e54;this[_0x4c87a2(0xe0)]=this[_0x4c87a2(0xe8)][_0x4c87a2(0x1a5)][_0x4c87a2(0x10b)](_0x4c87a2(0xf3)),this[_0x4c87a2(0xdc)]=this[_0x4c87a2(0xe8)][_0x4c87a2(0x1a5)][_0x4c87a2(0x10b)](_0x4c87a2(0x159)),this[_0x4c87a2(0xd2)]=this[_0x4c87a2(0xe8)][_0x4c87a2(0x1a5)][_0x4c87a2(0x10b)](_0x4c87a2(0x16e)),this[_0x4c87a2(0x1a1)]=new _0x241b19({'connector':this[_0x4c87a2(0xe0)],'displayedModels':this[_0x4c87a2(0xe8)][_0x4c87a2(0xb2)][_0x4c87a2(0x10b)](_0x4c87a2(0xe1)),'defaultModelId':this[_0x4c87a2(0xe8)][_0x4c87a2(0xb2)][_0x4c87a2(0x10b)](_0x4c87a2(0x7c))});const _0x18b13d=this[_0x4c87a2(0xe8)][_0x4c87a2(0x1a5)][_0x4c87a2(0x10b)](_0x4c87a2(0x14e));this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x12c),()=>{const _0x363ccb=_0x4c87a2;this[_0x363ccb(0x16d)]();}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x94),(_0x51a352,_0xbef083)=>{const _0x442ea8=_0x4c87a2;this[_0x442ea8(0xfb)]({'userMessage':_0xbef083});}),this[_0x4c87a2(0x1af)](_0x18b13d,_0x4c87a2(0xb6),(_0x4f1e51,_0x13d170)=>{const _0x2e9369=_0x4c87a2;this[_0x2e9369(0x12a)](_0x13d170);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x141),()=>{const _0x26da27=_0x4c87a2;_0x18b13d[_0x26da27(0xb7)]();}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x189),async()=>{const _0x315327=_0x4c87a2;await this[_0x315327(0x180)](),await this[_0x315327(0xde)]();}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0xad),()=>{const _0x1b7319=_0x4c87a2;this[_0x1b7319(0x154)]?.[_0x1b7319(0x147)](_0xe1cad0(this[_0x1b7319(0xe8)][_0x1b7319(0x109)],_0x1b7319(0x160)));}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x1b2),(_0x2a84c1,_0x43d03a)=>{const _0x358049=_0x4c87a2;this[_0x358049(0x154)]?.[_0x358049(0xe3)](Array[_0x358049(0x15c)](_0x43d03a));}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x13e),(_0x27c969,_0x584c17)=>{const _0x322120=_0x4c87a2;this[_0x322120(0x154)]?.[_0x322120(0x13e)](_0x584c17);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x1ae),(_0x5f090c,_0xd607)=>{const _0x4eecbf=_0x4c87a2;this[_0x4eecbf(0x154)]?.[_0x4eecbf(0x1ae)](_0xd607[_0x4eecbf(0x15e)],_0xd607[_0x4eecbf(0x96)]);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x136),(_0xbae6d3,_0x24a58b)=>{const _0x459040=_0x4c87a2;this[_0x459040(0x195)](_0x24a58b);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x16b),(_0x2b2f33,_0x16bb13)=>{const _0x2608b3=_0x4c87a2;this[_0x2608b3(0x154)]?.[_0x2608b3(0x16b)](_0x16bb13[_0x2608b3(0x1bb)],_0x16bb13[_0x2608b3(0x168)],_0x16bb13[_0x2608b3(0x185)]);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x15a),()=>{const _0x10570c=_0x4c87a2;this[_0x10570c(0x1ba)]();}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x115),()=>{const _0x53b8bb=_0x4c87a2;this[_0x53b8bb(0x133)]();}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x132),(_0x137f61,_0x4d9c7e)=>{const _0x3ff4f2=_0x4c87a2;this[_0x3ff4f2(0x154)]?.[_0x3ff4f2(0x140)](_0x4d9c7e);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x7e),(_0x66d5db,{replyId:_0x471cfe})=>{const _0x307b6d=_0x4c87a2;console[_0x307b6d(0x113)](_0x307b6d(0x1a2),_0x471cfe);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x11b),(_0x10d306,{replyId:_0x2e30e2})=>{const _0x5444b8=_0x4c87a2;console[_0x5444b8(0x113)](_0x5444b8(0x1ad),_0x2e30e2);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0xa3),(_0x225deb,_0x3691fd)=>{const _0x2f3a8d=_0x4c87a2;this[_0x2f3a8d(0xe8)][_0x2f3a8d(0x1a5)][_0x2f3a8d(0x10b)](_0x335532)[_0x2f3a8d(0x15b)](),this[_0x2f3a8d(0x184)](_0x3691fd);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x138),(_0x14e648,{replyId:_0x660acd,partIndex:_0x3b818d})=>{const _0x12f846=_0x4c87a2;this[_0x12f846(0x187)]=this[_0x12f846(0xdc)][_0x12f846(0x164)],this[_0x12f846(0xc4)](_0x660acd,_0x3b818d);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x1ac),(_0x4fe084,{replyId:_0x1220ce,partIndex:_0x236fdb})=>{const _0x1e25ae=_0x4c87a2,_0x2910f9=this[_0x1e25ae(0x156)](_0x1220ce,_0x236fdb);_0x2910f9&&_0x1e25ae(0xd1)!=_0x2910f9[_0x1e25ae(0x1bd)][_0x1e25ae(0x9f)][_0x1e25ae(0x110)]&&this[_0x1e25ae(0xd2)][_0x1e25ae(0x18a)]([_0x2910f9[_0x1e25ae(0x1bd)]],_0x1e25ae(0xed));}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x157),()=>{const _0x19d017=_0x4c87a2;this[_0x19d017(0xd2)][_0x19d017(0x183)](_0x19d017(0xed));}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0x17f),(_0x30ff11,_0x41d499)=>{const _0x14fe3b=_0x4c87a2;this[_0x14fe3b(0xe8)][_0x14fe3b(0x1a5)][_0x14fe3b(0x10b)](_0x335532)[_0x14fe3b(0x15b)](),this[_0x14fe3b(0x74)](_0x41d499);}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0xf0),async(_0x47cfb5,_0x160c88)=>{const _0x56bc50=_0x4c87a2,{reply:_0x3ce8dd}=this[_0x56bc50(0x12e)](_0x160c88[_0x56bc50(0xba)]),_0x359aa0=_0x41f855(this[_0x56bc50(0xe8)]),_0x534512=_0x31c5f2({'editor':_0x359aa0,'changeGroups':_0x3ce8dd[_0x56bc50(0xc6)],'documentContextContent':_0x3ce8dd[_0x56bc50(0xc3)],'showDiff':_0x160c88[_0x56bc50(0x164)]});await this[_0x56bc50(0xdc)][_0x56bc50(0x158)]({'id':_0x3ce8dd['id'],'parts':_0x534512,'renderingStrategy':_0x56bc50(0x12f)});}),this[_0x4c87a2(0x1af)](this[_0x4c87a2(0xdc)],_0x4c87a2(0xc7),(_0x370c8e,{replyId:_0x18751e,partIndex:_0x284d12})=>{const _0xe4b96f=_0x4c87a2;this[_0xe4b96f(0x8b)]?.[_0xe4b96f(0xba)]==_0x18751e&&this[_0xe4b96f(0x8b)]?.[_0xe4b96f(0xdf)]==_0x284d12&&this[_0xe4b96f(0xe8)][_0xe4b96f(0x1a5)][_0xe4b96f(0x10b)](_0x335532)[_0xe4b96f(0x15b)]();const {reply:_0x171b34}=this[_0xe4b96f(0x12e)](_0x18751e);_0x171b34[_0xe4b96f(0x11d)](_0x284d12,_0xe4b96f(0x129)),this[_0xe4b96f(0xd2)][_0xe4b96f(0x183)](_0xe4b96f(0xed));});}async[_0x555e54(0x151)](){const _0x567f85=_0x555e54;this[_0x567f85(0xe8)]instanceof _0xf79b2d?this[_0x567f85(0x117)](this[_0x567f85(0xe8)]):this[_0x567f85(0x1af)](this[_0x567f85(0xe8)][_0x567f85(0x192)],_0x567f85(0xeb),(_0x3ca147,_0x471423)=>{const _0x14bba6=_0x567f85;_0x471423['on'](_0x14bba6(0x11a),()=>{const _0x4d8f11=_0x14bba6;this[_0x4d8f11(0x117)](_0x471423);});}),await this[_0x567f85(0x16d)]();}[_0x555e54(0x184)](_0x407fd2){const _0x504e14=_0x555e54,_0x5c236f=_0x41f855(this[_0x504e14(0xe8)]);if(!_0x5c236f[_0x504e14(0x1a5)][_0x504e14(0x7b)](_0x504e14(0x167)))return;const _0x4feea1=this[_0x504e14(0xe8)][_0x504e14(0x1a5)][_0x504e14(0x10b)](_0x504e14(0x121)),{reply:_0x53ec1b,interaction:_0x33b0c0}=this[_0x504e14(0x12e)](_0x407fd2[_0x504e14(0xba)]),_0x39c6e1=this[_0x504e14(0x156)](_0x407fd2[_0x504e14(0xba)],_0x407fd2[_0x504e14(0xdf)]),_0xd604e2=void 0x0!==_0x407fd2[_0x504e14(0xdf)]?[_0x53ec1b[_0x504e14(0xc6)][_0x407fd2[_0x504e14(0xdf)]]]:_0x53ec1b[_0x504e14(0xc6)][_0x504e14(0x19d)](_0x3be1ac=>_0x504e14(0x16a)==_0x3be1ac[_0x504e14(0x170)]),_0x3c23fa=_0xd604e2[_0x504e14(0x197)](_0x1ea450=>_0x53ec1b[_0x504e14(0xc6)][_0x504e14(0xf1)](_0x1ea450));if(!_0x39c6e1||_0x504e14(0xd1)==_0x39c6e1[_0x504e14(0x1bd)][_0x504e14(0x9f)][_0x504e14(0x110)])return void _0x3c23fa[_0x504e14(0x76)](_0x1c24f5=>_0x53ec1b[_0x504e14(0x11d)](_0x1c24f5,_0x504e14(0x1b7)));_0x3c23fa[_0x504e14(0x76)](_0x386083=>_0x53ec1b[_0x504e14(0x11d)](_0x386083,_0x504e14(0x155)));const _0x3ae98a=_0x14293f({'editor':_0x5c236f,'reply':_0x53ec1b,'interaction':_0x33b0c0,'groups':_0xd604e2,'transform':!0x0,'documentCompare':_0x4feea1,'documentCompareOptions':{'anchor':_0x504e14(0x135),'markDeletions':!0x0}});let _0x6fabc8;_0x39c6e1&&this[_0x504e14(0x18c)](_0x39c6e1[_0x504e14(0x1bd)]),_0x5c236f[_0x504e14(0xaf)][_0x504e14(0x84)](_0x46cbdf=>{const _0x278419=_0x504e14;_0x6fabc8=_0x46cbdf[_0x278419(0xe7)],_0x5c236f[_0x278419(0x1a5)][_0x278419(0x10b)](_0x278419(0x167))[_0x278419(0xa4)](_0x3ae98a),this[_0x278419(0xd2)][_0x278419(0x183)](_0x278419(0xed));}),this[_0x504e14(0xc1)][_0x504e14(0x182)](_0x6fabc8,{'interactionId':_0x33b0c0['id'],'replyId':_0x53ec1b['id'],'indexes':_0x3c23fa[_0x504e14(0x14a)]()}),this[_0x504e14(0xf9)](_0x53ec1b);}[_0x555e54(0x74)](_0x38eddb){const _0x336338=_0x555e54,_0x27e85f=_0x41f855(this[_0x336338(0xe8)]),_0x2ebde0=this[_0x336338(0xe8)][_0x336338(0x1a5)][_0x336338(0x10b)](_0x21cae1),{reply:_0xa3c543,interaction:_0xb04b65}=this[_0x336338(0x12e)](_0x38eddb[_0x336338(0xba)]),_0x3fe7df=this[_0x336338(0x156)](_0x38eddb[_0x336338(0xba)],_0x38eddb[_0x336338(0xdf)]),_0x3da6da=void 0x0!==_0x38eddb[_0x336338(0xdf)]?[_0xa3c543[_0x336338(0xc6)][_0x38eddb[_0x336338(0xdf)]]]:_0xa3c543[_0x336338(0xc6)][_0x336338(0x19d)](_0xac883=>_0x336338(0x16a)==_0xac883[_0x336338(0x170)]),_0x521f17=_0x3da6da[_0x336338(0x197)](_0x11e575=>_0xa3c543[_0x336338(0xc6)][_0x336338(0xf1)](_0x11e575));if(!_0x3fe7df||_0x336338(0xd1)==_0x3fe7df[_0x336338(0x1bd)][_0x336338(0x9f)][_0x336338(0x110)])return void _0x521f17[_0x336338(0x76)](_0x249ba4=>_0xa3c543[_0x336338(0x11d)](_0x249ba4,_0x336338(0x1b7)));_0x521f17[_0x336338(0x76)](_0x3dff7a=>_0xa3c543[_0x336338(0x11d)](_0x3dff7a,_0x336338(0x155)));const _0x351e7c=_0x14293f({'editor':_0x27e85f,'reply':_0xa3c543,'interaction':_0xb04b65,'groups':_0x3da6da,'transform':!0x0,'documentCompare':_0x2ebde0,'documentCompareOptions':{'anchor':_0x336338(0x135),'markDeletions':!0x1}});let _0x58be3e;_0x3fe7df&&this[_0x336338(0x18c)](_0x3fe7df[_0x336338(0x1bd)]),_0x27e85f[_0x336338(0xaf)][_0x336338(0x84)](_0xe27e27=>{const _0x3553c2=_0x336338;_0x58be3e=_0xe27e27[_0x3553c2(0xe7)];for(const _0xc7e438 of _0x351e7c)_0xc7e438[_0x3553c2(0x9d)]=_0x27e85f[_0x3553c2(0xaf)][_0x3553c2(0x19e)][_0x3553c2(0x105)],_0xe27e27[_0x3553c2(0xe7)][_0x3553c2(0xe6)](_0xc7e438),_0x27e85f[_0x3553c2(0xaf)][_0x3553c2(0x193)](_0xc7e438);}),this[_0x336338(0xc1)][_0x336338(0x182)](_0x58be3e,{'interactionId':_0xb04b65['id'],'replyId':_0xa3c543['id'],'indexes':_0x521f17[_0x336338(0x14a)]()}),this[_0x336338(0xf9)](_0xa3c543);}[_0x555e54(0xc4)](_0x30d0d5,_0x17dba2){const _0x44cc6c=_0x555e54,_0x38e6a8=_0x41f855(this[_0x44cc6c(0xe8)]),_0x4ae22e=this[_0x44cc6c(0x156)](_0x30d0d5,_0x17dba2),_0x4cf465=this[_0x44cc6c(0xe8)][_0x44cc6c(0x1a5)][_0x44cc6c(0x10b)](_0x335532);if(!_0x4ae22e)return void _0x4cf465[_0x44cc6c(0x15b)]();const {range:_0x4ac626,currentIndex:_0x6e1f09,previousIndex:_0x315a89,nextIndex:_0x3b44ec}=_0x4ae22e;if(_0x44cc6c(0xd1)==_0x4ac626[_0x44cc6c(0x9f)][_0x44cc6c(0x110)]){const {reply:_0x329d27}=this[_0x44cc6c(0x12e)](_0x30d0d5);return _0x329d27[_0x44cc6c(0x11d)](_0x6e1f09,_0x44cc6c(0x1b7)),void _0x4cf465[_0x44cc6c(0x15b)]();}if(this[_0x44cc6c(0x8b)]?.[_0x44cc6c(0xba)]==_0x30d0d5&&this[_0x44cc6c(0x8b)]?.[_0x44cc6c(0xdf)]==_0x6e1f09)return;this[_0x44cc6c(0x8b)]={'replyId':_0x30d0d5,'partIndex':_0x6e1f09};const _0x2bf75f=new _0x49ed11(_0x38e6a8[_0x44cc6c(0x109)],{'showDiff':this[_0x44cc6c(0x187)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x44cc6c(0x17e)},'hideHeader':!0x0}),{reply:_0x548ebf}=this[_0x44cc6c(0x12e)](_0x30d0d5),_0x288b1a=_0x31c5f2({'editor':_0x38e6a8,'changeGroups':[_0x548ebf[_0x44cc6c(0xc6)][_0x6e1f09]],'documentContextContent':_0x548ebf[_0x44cc6c(0xc3)],'showDiff':this[_0x44cc6c(0x187)]});_0x2bf75f[_0x44cc6c(0xca)]({'parts':_0x288b1a,'renderingStrategy':_0x44cc6c(0x12f)});const _0x1c6e4d=_0x6e1f09!==_0x315a89;this[_0x44cc6c(0x18c)](_0x4ac626,!0x0),_0x4cf465[_0x44cc6c(0x191)]({'index':_0x6e1f09,'title':_0xe1cad0(this[_0x44cc6c(0xe8)][_0x44cc6c(0x109)],_0x44cc6c(0xf2),(_0x6e1f09+0x1)[_0x44cc6c(0x104)]()),'icon':_0x2cf943,'mainView':_0x2bf75f,'showRotator':_0x1c6e4d,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x4ac626]}),this[_0x44cc6c(0xdc)][_0x44cc6c(0x145)](_0x30d0d5,_0x6e1f09),this[_0x44cc6c(0x1af)](_0x2bf75f,_0x44cc6c(0xf0),(_0x254f13,{showDiff:_0x3ec8a6})=>{const _0x1d1670=_0x44cc6c;this[_0x1d1670(0x187)]=_0x3ec8a6;const {reply:_0x15d41e}=this[_0x1d1670(0x12e)](_0x30d0d5),_0x3ab0d4=_0x31c5f2({'editor':_0x38e6a8,'changeGroups':[_0x15d41e[_0x1d1670(0xc6)][_0x6e1f09]],'documentContextContent':_0x15d41e[_0x1d1670(0xc3)],'showDiff':_0x3ec8a6});_0x2bf75f[_0x1d1670(0xca)]({'parts':_0x3ab0d4,'renderingStrategy':_0x1d1670(0x12f)});}),this[_0x44cc6c(0x1af)](_0x4cf465,_0x44cc6c(0x17f),()=>{const _0x4b5bd2=_0x44cc6c;this[_0x4b5bd2(0x74)]({'replyId':_0x30d0d5,'partIndex':_0x6e1f09}),_0x1c6e4d?this[_0x4b5bd2(0xc4)](_0x30d0d5,_0x3b44ec):_0x4cf465[_0x4b5bd2(0x15b)]();}),this[_0x44cc6c(0x1af)](_0x4cf465,_0x44cc6c(0xa3),()=>{const _0x134dd4=_0x44cc6c;this[_0x134dd4(0x184)]({'replyId':_0x30d0d5,'partIndex':_0x6e1f09}),_0x1c6e4d?this[_0x134dd4(0xc4)](_0x30d0d5,_0x3b44ec):_0x4cf465[_0x134dd4(0x15b)]();}),_0x1c6e4d&&(this[_0x44cc6c(0x1af)](_0x4cf465,_0x44cc6c(0xfa),()=>{const _0x183c13=_0x44cc6c;this[_0x183c13(0xc4)](_0x30d0d5,_0x3b44ec);}),this[_0x44cc6c(0x1af)](_0x4cf465,_0x44cc6c(0x13c),()=>{const _0x205ef8=_0x44cc6c;this[_0x205ef8(0xc4)](_0x30d0d5,_0x315a89);})),this[_0x44cc6c(0x1af)](_0x4cf465,_0x44cc6c(0x93),()=>{const _0x34f077=_0x44cc6c;this[_0x34f077(0x196)](_0x4cf465),this[_0x34f077(0x196)](_0x2bf75f),this[_0x34f077(0x8b)]=null;});}[_0x555e54(0x156)](_0x360233,_0x521450){const _0x47167b=_0x555e54,_0xc0d718=_0x41f855(this[_0x47167b(0xe8)]),{reply:_0x4b16e5,interaction:_0x1a9c94}=this[_0x47167b(0x12e)](_0x360233),_0x44e26c=_0x4b16e5[_0x47167b(0xc6)][_0x47167b(0x19d)](_0x588163=>_0x47167b(0x16a)==_0x588163[_0x47167b(0x170)]),_0x3c299a=_0x44e26c[_0x47167b(0x197)](_0x34b3b1=>_0x4b16e5[_0x47167b(0xc6)][_0x47167b(0xf1)](_0x34b3b1));void 0x0===_0x521450&&(_0x521450=_0x3c299a[0x0]);const _0x37d0fa=_0x3c299a[_0x47167b(0xf1)](_0x521450);if(-0x1==_0x37d0fa)return null;const _0x13b681=0x0==_0x37d0fa?_0x3c299a[_0x3c299a[_0x47167b(0x18e)]-0x1]:_0x3c299a[_0x37d0fa-0x1],_0xfda8de=_0x37d0fa==_0x3c299a[_0x47167b(0x18e)]-0x1?_0x3c299a[0x0]:_0x3c299a[_0x37d0fa+0x1],_0x2a1fe4=_0x44e26c[_0x37d0fa],_0x132e62=new _0x376fef([]),_0x7268af=new _0x376fef([]);for(const _0x18495c of _0x2a1fe4[_0x47167b(0x8d)])if(_0x47167b(0xb3)!=_0x18495c[_0x47167b(0xc9)]&&_0x7268af[_0x47167b(0x18d)][_0x47167b(0x81)](_0x18495c[_0x47167b(0x118)][_0x47167b(0xd5)](!0x0)),_0x47167b(0xd6)!=_0x18495c[_0x47167b(0xc9)]){const _0x35b5c8=_0x34ca8c(_0x10890f=>_0x2600da(_0x10890f,_0x47167b(0x13d))==_0x18495c['id'],_0x4b16e5[_0x47167b(0xc3)],!0x0);_0x132e62[_0x47167b(0x18d)][_0x47167b(0x81)](_0x35b5c8[_0x47167b(0xd5)](!0x0));}if(0x0==_0x132e62[_0x47167b(0x18d)][_0x47167b(0x18e)]){if(_0x2a1fe4[_0x47167b(0x8d)][0x0][_0x47167b(0x139)]){const _0xe6f353=_0x39a0ed(_0x47167b(0x13d),_0x2a1fe4[_0x47167b(0x8d)][0x0][_0x47167b(0x139)],_0x4b16e5[_0x47167b(0xc3)]);_0x132e62[_0x47167b(0x18d)][_0x47167b(0x102)](_0xe6f353[_0x47167b(0xd5)](!0x0)),_0x7268af[_0x47167b(0x18d)][_0x47167b(0x102)](_0xe6f353[_0x47167b(0xd5)](!0x0)),_0xe6f353[_0x47167b(0x19a)]&&(_0x132e62[_0x47167b(0x18d)][_0x47167b(0x81)](_0xe6f353[_0x47167b(0x19a)][_0x47167b(0xd5)](!0x0)),_0x7268af[_0x47167b(0x18d)][_0x47167b(0x81)](_0xe6f353[_0x47167b(0x19a)][_0x47167b(0xd5)](!0x0)));}else{const _0x1ca595=_0x4b16e5[_0x47167b(0xc3)][_0x47167b(0x18d)][0x0];if(!_0x1ca595)return null;_0x132e62[_0x47167b(0x18d)][_0x47167b(0x81)](_0x1ca595[_0x47167b(0xd5)](!0x0)),_0x7268af[_0x47167b(0x18d)][_0x47167b(0x81)](_0x1ca595[_0x47167b(0xd5)](!0x0));}}const _0x371793=_0x1a9c94[_0x47167b(0x14c)](),_0x23420c=_0xc0d718[_0x47167b(0x11e)][_0x47167b(0x123)](_0x371793[_0x47167b(0xe4)]),_0x14d80c=_0x11046c(_0x132e62),_0x37dd85=_0xc0d718[_0x47167b(0x11e)][_0x47167b(0x123)](_0x14d80c),_0x5f39ba=_0xc0d718[_0x47167b(0x11e)][_0x47167b(0x123)](_0x14d80c),_0x58a8e6=_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x1c1)](_0x37dd85,0x0),_0x4e75da=_0x11046c(_0x7268af),_0x3cf8d7={'anchor':_0x58a8e6,'markDeletions':!0x1},_0x241887=_0xc0d718[_0x47167b(0x1a5)][_0x47167b(0x10b)](_0x21cae1)[_0x47167b(0x15d)](_0x14d80c,_0x4e75da,_0x3cf8d7)[_0x47167b(0x166)]();if(!_0x241887[_0x47167b(0x18e)])return null;_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x84)](_0x2cfe2f=>{const _0x30622b=_0x47167b;for(const _0x3415b1 of _0x241887)if(_0x30622b(0xa7)==_0x3415b1[_0x30622b(0xc9)]){const _0x563b4d=_0x3415b1[_0x30622b(0xd0)],_0x1ceac5=_0x3415b1[_0x30622b(0x116)],_0x253088=new _0x3d2d1f(_0x563b4d,_0x1ceac5);_0x2cfe2f[_0x30622b(0xe7)][_0x30622b(0xe6)](_0x253088),_0xc0d718[_0x30622b(0xaf)][_0x30622b(0x193)](_0x253088);}else _0x30622b(0xe5)!==_0x3415b1[_0x30622b(0xc9)]&&(_0x3415b1[_0x30622b(0x9d)]=null,_0x3415b1[_0x30622b(0x8a)]=!0x1,_0x2cfe2f[_0x30622b(0xe7)][_0x30622b(0xe6)](_0x3415b1),_0xc0d718[_0x30622b(0xaf)][_0x30622b(0x193)](_0x3415b1));});const _0x2c90c1=_0xa78144(_0xc0d718,_0x241887,_0x37dd85);_0x18ef92(_0xc0d718[_0x47167b(0xaf)],_0x2c90c1);const _0x178b9a=_0x2c90c1[_0x47167b(0x17b)]()[_0x47167b(0x19b)][_0x47167b(0x103)][_0x47167b(0x14a)](),_0x1e3d63=_0x2c90c1[_0x47167b(0x17b)]()[_0x47167b(0x70)][_0x47167b(0x103)][_0x47167b(0x14a)](),_0x657ab=[];let _0x39e170=_0x37dd85,_0x3d0860=_0x5f39ba;for(let _0x463f6f=0x0;_0x463f6f<_0x1e3d63[_0x47167b(0x18e)];_0x463f6f++){const _0x567a89=_0x39e170[_0x47167b(0xb0)]-_0x1e3d63[_0x463f6f];_0x657ab[_0x463f6f]=_0x3d0860[_0x47167b(0xb0)]-_0x567a89,_0x39e170=_0x39e170[_0x47167b(0xff)](_0x1e3d63[_0x463f6f]),_0x3d0860=_0x3d0860[_0x47167b(0xff)](_0x657ab[_0x463f6f]);}const _0x14fad2=_0xc0d718[_0x47167b(0xaf)][_0x47167b(0xfd)](_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x107)](_0x5f39ba,_0x178b9a),_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x107)](_0x5f39ba,_0x657ab)),_0x400e91=_0x5f39ba[_0x47167b(0x13a)](0x0)[_0x47167b(0xab)](_0x1d2c17),_0x164fd2=Array[_0x47167b(0x15c)](_0x23420c[_0x47167b(0x8c)]())[_0x47167b(0xd9)](_0x1229e2=>_0x1229e2[_0x47167b(0xab)](_0x1d2c17)==_0x400e91)[_0x47167b(0x178)](),_0x11a347=_0x14fad2[_0x47167b(0x19b)][_0x47167b(0x103)][_0x47167b(0x14a)](),_0x25a0a0=_0x14fad2[_0x47167b(0x70)][_0x47167b(0x103)][_0x47167b(0x14a)]();_0x11a347[0x0]=_0x164fd2[0x0]+_0x11a347[0x0],_0x25a0a0[0x0]=_0x164fd2[0x0]+_0x25a0a0[0x0];let _0x3dcec4=_0xc0d718[_0x47167b(0xaf)][_0x47167b(0xfd)](_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x107)](_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x19e)][_0x47167b(0x100)](),_0x11a347),_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x107)](_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x19e)][_0x47167b(0x100)](),_0x25a0a0));const _0x40a886=_0xc0d718[_0x47167b(0xaf)][_0x47167b(0x19e)][_0x47167b(0xf7)][_0x47167b(0x166)](_0x371793[_0x47167b(0x105)]);for(const _0x590eb0 of _0x40a886)_0x3dcec4=_0x2f7680[_0x47167b(0xa2)](_0x3dcec4[_0x47167b(0x119)](_0x590eb0));return{'range':_0x3dcec4,'previousIndex':_0x13b681,'nextIndex':_0xfda8de,'currentIndex':_0x521450};}[_0x555e54(0x117)](_0x65095e){const _0x4af8a5=_0x555e54;if(!_0x65095e[_0x4af8a5(0x1a5)][_0x4af8a5(0x7b)](_0x4af8a5(0x89)))return;const _0x1bd1d4=_0x65095e[_0x4af8a5(0x85)][_0x4af8a5(0x10b)](_0x4af8a5(0x14d)),_0x48eb3c=_0x65095e[_0x4af8a5(0x85)][_0x4af8a5(0x10b)](_0x4af8a5(0x1aa));this[_0x4af8a5(0x1af)](_0x1bd1d4,_0x4af8a5(0x112),(_0x3e6c10,_0x5051e6,_0x367f8a)=>{const _0x5b0f67=_0x4af8a5,_0x3b73e8=this[_0x5b0f67(0xc1)][_0x5b0f67(0x10b)](_0x5051e6);if(!_0x3b73e8)return;const _0x3b1080=this[_0x5b0f67(0x154)][_0x5b0f67(0x7a)](_0x3b73e8[_0x5b0f67(0x1b9)])[_0x5b0f67(0x1a8)](_0x3b73e8[_0x5b0f67(0xba)]);_0x3b73e8[_0x5b0f67(0x90)][_0x5b0f67(0x76)](_0x452ed8=>_0x3b1080[_0x5b0f67(0x11d)](_0x452ed8,_0x5b0f67(0x16a))),this[_0x5b0f67(0xc1)][_0x5b0f67(0x10f)](_0x5051e6),this[_0x5b0f67(0xc1)][_0x5b0f67(0x182)](_0x367f8a,_0x3b73e8);}),this[_0x4af8a5(0x1af)](_0x48eb3c,_0x4af8a5(0x112),(_0x297a1a,_0x32b8db,_0x507075)=>{const _0x176112=_0x4af8a5,_0x651103=this[_0x176112(0xc1)][_0x176112(0x10b)](_0x32b8db);if(!_0x651103)return;const _0x396d65=this[_0x176112(0x154)][_0x176112(0x7a)](_0x651103[_0x176112(0x1b9)])[_0x176112(0x1a8)](_0x651103[_0x176112(0xba)]);_0x651103[_0x176112(0x90)][_0x176112(0x76)](_0x1c1c68=>_0x396d65[_0x176112(0x11d)](_0x1c1c68,_0x176112(0x155))),this[_0x176112(0xc1)][_0x176112(0x10f)](_0x32b8db),this[_0x176112(0xc1)][_0x176112(0x182)](_0x507075,_0x651103);});}async[_0x555e54(0xf4)](_0x2bde88){const _0x5d0854=_0x555e54;this[_0x5d0854(0xe8)][_0x5d0854(0x1a5)][_0x5d0854(0x10b)](_0x335532)[_0x5d0854(0x15b)](),this[_0x5d0854(0xdc)][_0x5d0854(0x13b)](_0x5d0854(0x12f)),this[_0x5d0854(0xdc)][_0x5d0854(0x14b)](!0x0),await this[_0x5d0854(0x180)]();try{const _0x5d7834=this[_0x5d0854(0xe8)][_0x5d0854(0x1a5)][_0x5d0854(0x10b)](_0x2efbc4);this[_0x5d0854(0x75)]('\x20'),_0x5d7834[_0x5d0854(0x83)][_0x5d0854(0xce)](_0x5d0854(0x1a6)),await this[_0x5d0854(0x16d)](_0x2bde88);const {sessionId:_0x3ef430}=this[_0x5d0854(0xd2)][_0x5d0854(0x7d)]();await this[_0x5d0854(0x154)][_0x5d0854(0xf5)](_0x2bde88,_0x3ef430),this[_0x5d0854(0x154)][_0x5d0854(0x1b8)]()&&this[_0x5d0854(0x154)][_0x5d0854(0x147)](_0xe1cad0(this[_0x5d0854(0xe8)][_0x5d0854(0x109)],_0x5d0854(0x160)));}catch(_0x307a3f){console[_0x5d0854(0xfe)](_0x5d0854(0x171),_0x307a3f);}finally{this[_0x5d0854(0xdc)][_0x5d0854(0x13b)](_0x5d0854(0x12d)),this[_0x5d0854(0xdc)][_0x5d0854(0x14b)](!0x1);}}[_0x555e54(0x13f)](_0x781f00){const _0x301f01=_0x555e54;this[_0x301f01(0x154)]['id']===_0x781f00&&this[_0x301f01(0x16d)]();}async[_0x555e54(0xcf)](){const _0x3d0f39=_0x555e54,_0x4af594=this[_0x3d0f39(0xd2)][_0x3d0f39(0x1be)]();this[_0x3d0f39(0x154)]?.[_0x3d0f39(0x124)](_0x4af594),this[_0x3d0f39(0x154)]?.[_0x3d0f39(0x147)](_0xe1cad0(this[_0x3d0f39(0xe8)][_0x3d0f39(0x109)],_0x3d0f39(0x160)));}[_0x555e54(0x131)](){const _0x5cc8b3=_0x555e54;this[_0x5cc8b3(0x154)]?.[_0x5cc8b3(0x17a)]();}[_0x555e54(0x9a)](){const _0x391fb0=_0x555e54;this[_0x391fb0(0xdc)][_0x391fb0(0x9a)]();}async[_0x555e54(0x12c)](){const _0xa4cb18=_0x555e54;await this[_0xa4cb18(0x16d)]();}async[_0x555e54(0xb5)]({message:_0xf294bf,quickActionData:_0x15bfcf}){const _0x271b77=_0x555e54;await this[_0x271b77(0xfb)]({'userMessage':_0xf294bf,'quickActionData':_0x15bfcf});}[_0x555e54(0xe2)](){const _0x1b21c0=_0x555e54,_0x5d9ae4=this[_0x1b21c0(0xe8)][_0x1b21c0(0xb2)][_0x1b21c0(0x10b)](_0x1b21c0(0x152));if(!_0x5d9ae4)throw new _0x2db741(_0x1b21c0(0x175),this);return _0x5d9ae4;}async[_0x555e54(0x16d)](_0x31ee4b){const _0x37bd99=_0x555e54;try{this[_0x37bd99(0xdc)][_0x37bd99(0xc5)](),await this[_0x37bd99(0x16c)](_0x31ee4b);}catch(_0x3a24ce){_0x224fdf(_0x37bd99(0x19f),_0x3a24ce),this[_0x37bd99(0x154)]=void 0x0,this[_0x37bd99(0xdc)][_0x37bd99(0xea)]();}}async[_0x555e54(0x16c)](_0x5b66c0){const _0xf943f0=_0x555e54,_0x2870d6=this[_0xf943f0(0xe8)][_0xf943f0(0x1a5)][_0xf943f0(0x10b)](_0x335532);let _0x1ceb20;_0x2870d6[_0xf943f0(0x186)]&&_0x2870d6[_0xf943f0(0x15b)](),_0x5b66c0||!this[_0xf943f0(0x154)]?_0x1ceb20=this[_0xf943f0(0xe8)][_0xf943f0(0xb2)][_0xf943f0(0x10b)](_0xf943f0(0x7c)):this[_0xf943f0(0xdc)][_0xf943f0(0x72)]&&(_0x1ceb20=this[_0xf943f0(0x154)][_0xf943f0(0x165)]['id']),await this[_0xf943f0(0x180)]();const _0xa2a4a7=this[_0xf943f0(0xe2)](),_0x3b06c5=_0x5b66c0||_0x1748d5();this[_0xf943f0(0x154)]=new _0x12da7f({'connector':this[_0xf943f0(0xe0)],'chatModels':this[_0xf943f0(0x1a1)],'selectedModelId':_0x1ceb20,'conversationId':_0x3b06c5,'group':_0xa2a4a7,'getEditor':()=>_0x41f855(this[_0xf943f0(0xe8)])}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x122),(_0xe2df5,_0x346998)=>{const _0x13476e=_0xf943f0;this[_0x13476e(0xdc)][_0x13476e(0x174)](_0x346998),this[_0x13476e(0xdc)][_0x13476e(0x18f)](),this[_0x13476e(0xdc)][_0x13476e(0x101)](),this[_0x13476e(0xdc)][_0x13476e(0x87)](),_0x5b66c0||(this[_0x13476e(0xdc)][_0x13476e(0x10d)](),this[_0x13476e(0x154)]?.[_0x13476e(0x147)](_0xe1cad0(this[_0x13476e(0xe8)][_0x13476e(0x109)],_0x13476e(0x160))));}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x79),(_0x6cf3a9,_0x262288)=>{const _0x19e75d=_0xf943f0;this[_0x19e75d(0xdc)][_0x19e75d(0x1b1)](_0x262288[_0x19e75d(0x95)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x172),(_0x52c7cf,_0xc9b98f)=>{const _0x538ee8=_0xf943f0;this[_0x538ee8(0xdc)][_0x538ee8(0x78)](_0xc9b98f);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x1a9),()=>{const _0x35f617=_0xf943f0;this[_0x35f617(0xdc)][_0x35f617(0x176)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xbb),()=>{const _0xce0d13=_0xf943f0;this[_0xce0d13(0xdc)][_0xce0d13(0x176)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xa1),(_0x31b18a,_0x18fb05)=>{const _0x32c4e4=_0xf943f0;this[_0x32c4e4(0xdc)][_0x32c4e4(0x6b)](_0x18fb05,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x190),(_0x1722d7,_0x290643)=>{const _0x40f6d4=_0xf943f0;this[_0x40f6d4(0xdc)][_0x40f6d4(0x6b)](_0x290643,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xd3),()=>{const _0x1285af=_0xf943f0;this[_0x1285af(0xdc)][_0x1285af(0x86)]();}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x1bf),async()=>{const _0x203c08=_0xf943f0;await this[_0x203c08(0xdc)][_0x203c08(0x179)]();}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x10c),(_0x2b8d1c,_0x4289cb)=>{const _0xca573f=_0xf943f0;this[_0xca573f(0xdc)][_0xca573f(0xb8)](_0x4289cb['id']);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x153),(_0xccccac,_0x310d64,_0x9d72e6)=>{const _0xfc4526=_0xf943f0;this[_0xfc4526(0x75)](_0x310d64,_0x9d72e6);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x177),(_0x32d5a9,_0x2ddd94)=>{const _0x4f70b6=_0xf943f0;_0x4f70b6(0x8f)===_0x2ddd94[_0x4f70b6(0xc9)]?this[_0x4f70b6(0xdc)][_0x4f70b6(0xb4)](_0x2ddd94):this[_0x4f70b6(0xdc)][_0x4f70b6(0x128)](_0x2ddd94);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xc0),async(_0x57da63,_0x29bdc0,_0x338832)=>{const _0x56aa1e=_0xf943f0;await this[_0x56aa1e(0x17d)]({'reply':_0x29bdc0,'changeGroups':_0x338832});}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xda),(_0x429299,{reply:_0x56cc6e,index:_0x49613e,state:_0x178036})=>{const _0x4291f5=_0xf943f0;this[_0x4291f5(0xdc)][_0x4291f5(0x98)]({'id':_0x56cc6e['id'],'index':_0x49613e,'state':_0x178036});}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xbe),(_0x43608b,_0x5eecba)=>{const _0x3c85f1=_0xf943f0;if(this[_0x3c85f1(0xdc)][_0x3c85f1(0x111)](_0x5eecba[_0x3c85f1(0x99)],_0x5eecba[_0x3c85f1(0x142)]),_0x3c85f1(0xc2)===_0x5eecba[_0x3c85f1(0x99)][_0x3c85f1(0xc9)]){const _0x242193=[..._0x41f855(this[_0x3c85f1(0xe8)])[_0x3c85f1(0xaf)][_0x3c85f1(0x19e)][_0x3c85f1(0xc2)][_0x3c85f1(0xa5)]()];this[_0x3c85f1(0xd2)][_0x3c85f1(0x18a)](_0x242193,_0x3c85f1(0x15f)+this[_0x3c85f1(0x154)]?.['id']);}}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x10a),(_0x3653f0,_0x2b2351)=>{const _0x27c4c4=_0xf943f0;this[_0x27c4c4(0xdc)][_0x27c4c4(0x136)](_0x2b2351[_0x27c4c4(0x199)]),_0x27c4c4(0x161)==_0x2b2351[_0x27c4c4(0x199)]&&this[_0x27c4c4(0x131)](),_0x27c4c4(0xc2)===_0x2b2351[_0x27c4c4(0xc9)]&&this[_0x27c4c4(0xd2)][_0x27c4c4(0x183)](_0x27c4c4(0x15f)+this[_0x27c4c4(0x154)]?.['id']);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x17c),(_0x5453cd,_0x513e47)=>{const _0x46fc38=_0xf943f0;this[_0x46fc38(0xdc)][_0x46fc38(0x137)](_0x513e47[_0x46fc38(0x99)][_0x46fc38(0x199)],_0x513e47[_0x46fc38(0x142)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xa0),(_0xe72735,_0x2a0b82)=>{const _0x27d813=_0xf943f0;this[_0x27d813(0xdc)][_0x27d813(0x10e)](_0x2a0b82[_0x27d813(0xcb)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x194),(_0x1ec048,_0x1b3663)=>{const _0x5900f1=_0xf943f0;this[_0x5900f1(0xdc)][_0x5900f1(0xac)](_0x1b3663[_0x5900f1(0x198)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x9e),(_0x589c77,_0x19062a)=>{const _0x5c6460=_0xf943f0;this[_0x5c6460(0xdc)][_0x5c6460(0x6c)](_0x19062a[_0x5c6460(0x1bb)],_0x19062a[_0x5c6460(0x15e)],_0x19062a[_0x5c6460(0x126)],_0x19062a[_0x5c6460(0x185)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xec),(_0x39baee,_0x16e89a)=>{const _0x543a3e=_0xf943f0;this[_0x543a3e(0xdc)][_0x543a3e(0x1a3)](_0x16e89a[_0x543a3e(0x1bb)],_0x16e89a[_0x543a3e(0x1c0)],_0x16e89a[_0x543a3e(0xa9)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x11c),(_0x1b1854,_0x2f257c)=>{const _0x3a85a6=_0xf943f0;this[_0x3a85a6(0xdc)][_0x3a85a6(0x106)](_0x2f257c);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0x144),(_0x88695,_0x46be5f)=>{const _0x3929c4=_0xf943f0;this[_0x3929c4(0xdc)][_0x3929c4(0x9b)](_0x46be5f[_0x3929c4(0x165)],_0x46be5f[_0x3929c4(0x9c)]);}),this[_0xf943f0(0x154)]['on'](_0xf943f0(0xfe),(_0x107ac5,{error:_0x247fbd,interactionId:_0x6ab05d,fileName:_0x45dd9b,url:_0x1b94e8,sourceId:_0x8382c0,sourceLabel:_0x456ca6})=>{const _0x37224b=_0xf943f0,_0x37dc42=_0x6ab05d?_0x6ab05d+':'+_0x1748d5():_0x1748d5();_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x148))?this[_0x37224b(0xdc)][_0x37224b(0xee)]({'staticMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0xd4)),'id':_0x37dc42}):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x73))||_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x19f))?(this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0x1b4)),'id':_0x37dc42}),this[_0x37224b(0x77)](_0x247fbd)):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x92))?this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0xae),_0x45dd9b),'id':_0x37dc42}):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x134))?this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0x188),_0x1b94e8),'id':_0x37dc42}):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0xc8))?this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0x1ab)),'id':_0x37dc42}):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x1b3))?this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0xb9)),'id':_0x37dc42}):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0xcd))?(_0x8382c0&&this[_0x37224b(0xdc)][_0x37224b(0x130)](_0x8382c0),this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0x19c),_0x456ca6||_0x37224b(0x15e)),'id':_0x37dc42}),this[_0x37224b(0x77)](_0x247fbd)):_0x247fbd[_0x37224b(0x127)][_0x37224b(0x16f)](_0x37224b(0x11f))?(this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0x1a4)),'id':_0x37dc42}),this[_0x37224b(0x77)](_0x247fbd)):(this[_0x37224b(0xdc)][_0x37224b(0x7f)]({'errorMessage':_0xe1cad0(this[_0x37224b(0xe8)][_0x37224b(0x109)],_0x37224b(0x88)),'id':_0x37dc42}),this[_0x37224b(0x77)](_0x247fbd));}),await this[_0xf943f0(0x154)][_0xf943f0(0x162)](this[_0xf943f0(0xe8)][_0xf943f0(0xb2)][_0xf943f0(0x10b)](_0xf943f0(0xaa))),_0x5b66c0||await this[_0xf943f0(0x154)][_0xf943f0(0x19b)]();}async[_0x555e54(0xfb)]({userMessage:_0x70f32a,quickActionData:_0x291490}){const _0x3cc05f=_0x555e54;if(!this[_0x3cc05f(0x154)])throw new _0x2db741(_0x3cc05f(0xa8));this[_0x3cc05f(0x154)][_0x3cc05f(0x8e)]()&&await this[_0x3cc05f(0x154)][_0x3cc05f(0x1b5)](this[_0x3cc05f(0xd2)][_0x3cc05f(0x7d)]()),this[_0x3cc05f(0x154)]['id']&&this[_0x3cc05f(0x154)][_0x3cc05f(0x6d)]&&await this[_0x3cc05f(0x154)][_0x3cc05f(0xef)]({'userMessage':_0x70f32a,'quickActionData':_0x291490}),this[_0x3cc05f(0x6f)]();}[_0x555e54(0x6f)](){const _0x290f10=_0x555e54,_0x29ad22=_0x41f855(this[_0x290f10(0xe8)])[_0x290f10(0xaf)],_0x5e842b=Array[_0x290f10(0x15c)](_0x29ad22[_0x290f10(0x146)][_0x290f10(0xfc)](_0x51d958));_0x29ad22[_0x290f10(0x84)](_0x40477b=>{const _0x360302=_0x290f10;_0x5e842b[_0x360302(0x76)](_0x958db0=>_0x40477b[_0x360302(0xb1)](_0x958db0));});}[_0x555e54(0x163)](){const _0x5867bc=_0x555e54;console[_0x5867bc(0x113)](_0x5867bc(0xdb));}[_0x555e54(0x12a)](_0x16c793){const _0x11bcc8=_0x555e54;this[_0x11bcc8(0xdc)][_0x11bcc8(0x1bc)](_0x16c793);}[_0x555e54(0x77)](_0x27a74c){const _0x1e33c0=_0x555e54;_0x224fdf(_0x27a74c[_0x1e33c0(0x127)]);}[_0x555e54(0x195)](_0x3eefd4){const _0x58bd32=_0x555e54;this[_0x58bd32(0x154)]?.[_0x58bd32(0x125)](_0x3eefd4);}[_0x555e54(0x1ba)](){const _0x37ed34=_0x555e54;this[_0x37ed34(0x154)]?.[_0x37ed34(0x15a)]();}[_0x555e54(0x133)](){const _0xb93cfa=_0x555e54;this[_0xb93cfa(0x154)]?.[_0xb93cfa(0x115)]();}[_0x555e54(0x12e)](_0x5128a2){const _0x5e1870=_0x555e54,[_0x57eddd,_0x5a8805]=_0x5128a2[_0x5e1870(0x114)](':'),_0x45af1b=this[_0x5e1870(0x154)][_0x5e1870(0x7a)](_0x57eddd),_0x215f4c=_0x45af1b[_0x5e1870(0x1a8)](_0x5a8805);return{'interaction':_0x45af1b,'reply':_0x215f4c};}[_0x555e54(0x18c)](_0x2a0c1c,_0x1f0b15=!0x1){const _0x13d5bd=_0x555e54,_0x2402bb=_0x41f855(this[_0x13d5bd(0xe8)]),_0x1a0564={'target':_0x2402bb[_0x13d5bd(0xcc)][_0x13d5bd(0x83)][_0x13d5bd(0x173)][_0x13d5bd(0xf8)](_0x2402bb[_0x13d5bd(0xcc)][_0x13d5bd(0xe9)][_0x13d5bd(0xf6)](_0x2a0c1c)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1f0b15};_0x1f0b15&&(_0x1a0564[_0x13d5bd(0x14f)]=!0x0),_0x3a00cc(_0x1a0564);}[_0x555e54(0x75)](_0x226ee4,_0x152824=!0x1){const _0x165573=_0x555e54;this[_0x165573(0xdc)][_0x165573(0x153)](_0x226ee4||_0xe1cad0(this[_0x165573(0xe8)][_0x165573(0x109)],_0x165573(0xdd)),_0x152824);}async[_0x555e54(0x17d)]({reply:_0x455c62,changeGroups:_0x41d9e9,renderingStrategy:_0x19960e}){const _0x3f32db=_0x555e54,{id:_0x18d4b5,isDone:_0x504ca2,type:_0x24816b,parsedContent:_0x2d089b}=_0x455c62;if(_0x3f32db(0x71)===_0x24816b){const _0x57351f=_0x41f855(this[_0x3f32db(0xe8)]),_0x56a1e6=_0x31c5f2({'editor':_0x57351f,'showDiff':this[_0x3f32db(0xdc)][_0x3f32db(0x164)],'changeGroups':_0x41d9e9,'documentContextContent':_0x455c62[_0x3f32db(0xc3)]});await this[_0x3f32db(0xdc)][_0x3f32db(0x158)]({'id':_0x18d4b5,'parts':_0x56a1e6,'renderingStrategy':_0x19960e,'isDone':_0x504ca2});}else _0x3f32db(0x8f)===_0x24816b&&await this[_0x3f32db(0xdc)][_0x3f32db(0xd8)]({'id':_0x18d4b5,'parsedContent':_0x2d089b,'renderingStrategy':_0x19960e,'isDone':_0x504ca2});_0x504ca2&&_0x455c62[_0x3f32db(0x1b6)][_0x3f32db(0x18e)]>0x0&&this[_0x3f32db(0xdc)][_0x3f32db(0x82)](_0x18d4b5,_0x455c62[_0x3f32db(0x1b6)]);}async[_0x555e54(0x180)](){const _0x11c2f5=_0x555e54,_0x4705c7=this[_0x11c2f5(0x154)]?.[_0x11c2f5(0x143)];_0x4705c7&&(_0x4705c7[_0x11c2f5(0x97)](),this[_0x11c2f5(0xdc)][_0x11c2f5(0x1a0)](_0x4705c7));}async[_0x555e54(0xde)](){const _0x1ceb60=_0x555e54,_0x3dc915=this[_0x1ceb60(0x154)]?.[_0x1ceb60(0x143)];if(_0x3dc915){for await(const _0x180fcb of _0x3dc915[_0x1ceb60(0xa6)])await this[_0x1ceb60(0x17d)]({'reply':_0x180fcb,'changeGroups':_0x180fcb[_0x1ceb60(0xc6)],'renderingStrategy':_0x1ceb60(0x12f)});}}[_0x555e54(0xf9)](_0x5ec0e9){const _0x54ad0a=_0x555e54,_0xcfb8b8={'positiveCount':_0x5ec0e9[_0x54ad0a(0xc6)][_0x54ad0a(0x19d)](_0x24e0f1=>_0x54ad0a(0x155)===_0x24e0f1[_0x54ad0a(0x170)])[_0x54ad0a(0x18e)],'totalCount':_0x5ec0e9[_0x54ad0a(0xc6)][_0x54ad0a(0x18e)]},_0xe4e43f=this[_0x54ad0a(0x154)][_0x54ad0a(0x7a)](_0x5ec0e9[_0x54ad0a(0x1b9)])[_0x54ad0a(0x1b0)];this[_0x54ad0a(0xe0)][_0x54ad0a(0xbc)](this[_0x54ad0a(0x154)]['id'],_0xe4e43f,_0xcfb8b8);}}
|
package/src/aichat/aichatui.d.ts
CHANGED
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x282ed4=_0x4993;(function(_0x3bf04f,_0xacfc9c){const _0x5a803c=_0x4993,_0x1a70f1=_0x3bf04f();while(!![]){try{const _0x221baf=-parseInt(_0x5a803c(0x173))/0x1*(parseInt(_0x5a803c(0x1fd))/0x2)+parseInt(_0x5a803c(0x179))/0x3*(-parseInt(_0x5a803c(0x1ae))/0x4)+parseInt(_0x5a803c(0x1c2))/0x5+parseInt(_0x5a803c(0x197))/0x6+-parseInt(_0x5a803c(0x1eb))/0x7*(-parseInt(_0x5a803c(0x192))/0x8)+parseInt(_0x5a803c(0x205))/0x9+-parseInt(_0x5a803c(0x206))/0xa;if(_0x221baf===_0xacfc9c)break;else _0x1a70f1['push'](_0x1a70f1['shift']());}catch(_0x588233){_0x1a70f1['push'](_0x1a70f1['shift']());}}}(_0x1105,0x851c9));import{ContextPlugin as _0x269f6d}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x22b608}from'ckeditor5/src/utils.js';import{AIChatView as _0x2c5156}from'./ui/aichatview.js';import{AITabs as _0x54c33f}from'../aitabs/aitabs.js';function _0x1105(){const _0x32952b=['showResizeButton','<p>','_animateConversationTitle','setReasoning','set','user-message','startsWith','interactionId','startAutoScroll','addFeedItemUserMessage','requires','abort','addFeedInteractionHeader','createConversation','updateFeedItemAIReplySuggestionPartState','setSelectedModel','isLoading','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','1702185oGyhyG','isBusy','AI_CHAT_WELCOME_MESSAGE','isReasoningEnabled','addTab','updateSuggestionPartState','addFeedItemStaticMessage','removeFeedInteraction','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','setWebSearch','value','updateWebSources','_getLoadingMessage','capabilities','clearPendingContextUI','setModelList','_interactionPromiseResolver','chatFeed','ai-reply','remove','isVisible','AITabs','resetConversationTitle','setFeedItemRenderingStrategy','displayedPrompt','stopAutoScroll','startInteraction','locale','ai.availableReplyActions','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','children','setConversationContext','then','conversation-start','closeSourceResourceBalloon','enableControls','isWebSearchEnabled','removeItem','disableModelSelector','disableControls','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','14jGCfQp','_titleAnimationInterval','isDone','renderingStrategy','resetMessageInput','addContextItem','queueEmptyPromise','toggleLoadingSkeleton','updateFeedInteractionHeader','chatHeader','isPending','userMessage','stopInteraction','quickActionData','_isTrackChangesCommandValueBound','AIChatUI','</p>','addFeedItemAISuggestion','132766BnGISw','AI_CHAT_HEADING','updateFeedItemAIReplySuggestionContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','availableModels','values','toggleSuggestionDisplayMode','destroy','8418465VOtEbF','8704200hlAVrv','addFeedItemError','_promiseQueue','pluginName','get','showDiff','finishInteraction','enqueue','view','commands','updateFeedItemAIReplySources','label','plugins','addItem','populateSourceResourceBalloon','1kTLCnR','trackChanges','clear','updateFeedItemAIReplyContent','_view','getItemIds','42nBXNzd','markFeedItemAsDone','markItemAsDone','isDisabled','contextItems','removeContextItem','updateSuggestionItem','filter','bind','from','setAddContextOptions','setLoadingMessage','setConversationTitle','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','streaming','config','isTrackChangesOn','ai.chat.models.modelSelectorAlwaysVisible','isPremiumPlugin','feedItemRenderingStrategy','_getInputPlaceholder','context','updateResourceState','setIsMaximized','length','211216qHRIYz','forEach','clearConversationContextUI','enableModelSelector','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','3064260lXwDFC','setContextItemLoading','error-message','chat','focusPromptInput','setModel','setInputPlaceholder','delegate','last','setIsUploadInProgress','scrollFeedToSuggestion','isOfficialPlugin','ai-suggestion-reply','updateCapabilities','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','updateReplyItem','isMaximized','find','scrollToSuggestion','options','areActionsDisabled','interaction-header','chatControls','102088TcrKJy','addFeedItemAIReply'];_0x1105=function(){return _0x32952b;};return _0x1105();}import{getTranslation as _0x19279e}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x143359}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x3fb43e}from'./ui/feed/aichatfeedinteractionheaderview.js';function _0x4993(_0x31e916,_0x303f98){const _0x110578=_0x1105();return _0x4993=function(_0x499349,_0x579ae6){_0x499349=_0x499349-0x16f;let _0x58f542=_0x110578[_0x499349];return _0x58f542;},_0x4993(_0x31e916,_0x303f98);}import{PromiseQueue as _0x962b79}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x590c43}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x27296f}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x269f6d{static get[_0x282ed4(0x1ba)](){return[_0x54c33f];}[_0x282ed4(0x177)];static get[_0x282ed4(0x209)](){const _0x182850=_0x282ed4;return _0x182850(0x1fa);}static get[_0x282ed4(0x1a2)](){return!0x0;}static get[_0x282ed4(0x18b)](){return!0x0;}[_0x282ed4(0x18c)]=_0x282ed4(0x187);[_0x282ed4(0x20b)]=!0x0;[_0x282ed4(0x208)];[_0x282ed4(0x1d2)];[_0x282ed4(0x1ec)]=void 0x0;[_0x282ed4(0x1f9)]=!0x1;constructor(_0x3fe3a2){const _0x3040c5=_0x282ed4;super(_0x3fe3a2);const _0x3f72b2=this[_0x3040c5(0x18e)][_0x3040c5(0x170)][_0x3040c5(0x20a)](_0x3040c5(0x1d7));this[_0x3040c5(0x1b4)](_0x3040c5(0x1c3),!0x1),this[_0x3040c5(0x208)]=new _0x962b79(),this[_0x3040c5(0x177)]=new _0x2c5156(this[_0x3040c5(0x18e)][_0x3040c5(0x1dd)],_0x3f72b2[_0x3040c5(0x1b0)]),this[_0x3040c5(0x177)][_0x3040c5(0x19e)](..._0x590c43)['to'](this),this[_0x3040c5(0x177)]['on'](_0x3040c5(0x203),(_0x39630f,{showDiff:_0xdc0d8d})=>{const _0x388593=_0x3040c5;this[_0x388593(0x20b)]=_0xdc0d8d;}),_0x3f72b2[_0x3040c5(0x20e)][_0x3040c5(0x1c6)]({'id':_0x3040c5(0x19a),'buttonLabel':_0x19279e(this[_0x3040c5(0x18e)][_0x3040c5(0x1dd)],_0x3040c5(0x1fe)),'buttonIcon':_0x143359,'order':0x0,'content':this[_0x3040c5(0x177)]}),this[_0x3040c5(0x177)][_0x3040c5(0x1ad)][_0x3040c5(0x181)](_0x3040c5(0x1c0))['to'](this,_0x3040c5(0x1c3),_0x378c48=>_0x378c48),this[_0x3040c5(0x177)][_0x3040c5(0x1d3)][_0x3040c5(0x181)](_0x3040c5(0x1f5))['to'](this,_0x3040c5(0x1c3),_0x1c547b=>_0x1c547b),this[_0x3040c5(0x177)][_0x3040c5(0x1ad)][_0x3040c5(0x19d)](this[_0x3040c5(0x18d)]());}[_0x282ed4(0x204)](){const _0x1a4770=_0x282ed4;super[_0x1a4770(0x204)](),this[_0x1a4770(0x1ec)]&&clearInterval(this[_0x1a4770(0x1ec)]);}[_0x282ed4(0x1bd)](_0x1bf299){const _0x3067a4=_0x282ed4;this[_0x3067a4(0x177)][_0x3067a4(0x1d3)][_0x3067a4(0x175)](),this[_0x3067a4(0x177)][_0x3067a4(0x1ad)][_0x3067a4(0x195)](),this[_0x3067a4(0x177)][_0x3067a4(0x1ad)][_0x3067a4(0x1d1)](_0x1bf299[_0x3067a4(0x201)],!this[_0x3067a4(0x18e)][_0x3067a4(0x188)][_0x3067a4(0x20a)](_0x3067a4(0x18a))),this[_0x3067a4(0x1c8)]({'id':_0x3067a4(0x1e3),'staticMessage':_0x19279e(this[_0x3067a4(0x18e)][_0x3067a4(0x1dd)],_0x3067a4(0x1c4))});}[_0x282ed4(0x1c8)]({id:_0x1a09ad,staticMessage:_0x56afea}){const _0xabdbfd=_0x282ed4;this[_0xabdbfd(0x177)][_0xabdbfd(0x1d3)][_0xabdbfd(0x171)](_0xabdbfd(0x1d4),{'id':_0x1a09ad,'initialContent':_0xabdbfd(0x1b1)+_0x56afea+_0xabdbfd(0x1fb)});}[_0x282ed4(0x1b9)](_0x1a0068){const _0x5d30ca=_0x282ed4,_0x38b3aa=_0x1a0068[_0x5d30ca(0x1f8)]?.[_0x5d30ca(0x1da)]||_0x1a0068[_0x5d30ca(0x1f6)];this[_0x5d30ca(0x177)][_0x5d30ca(0x1d3)][_0x5d30ca(0x171)](_0x5d30ca(0x1b5),{'contextItems':Array[_0x5d30ca(0x182)](_0x1a0068[_0x5d30ca(0x17d)][_0x5d30ca(0x202)]()),'initialContent':_0x5d30ca(0x1b1)+_0x38b3aa+_0x5d30ca(0x1fb),'id':_0x1a0068['id']});}[_0x282ed4(0x207)]({errorMessage:_0x14c424,id:_0x263c56}){const _0x49adb6=_0x282ed4;this[_0x49adb6(0x177)][_0x49adb6(0x1d3)][_0x49adb6(0x171)](_0x49adb6(0x199),{'initialContent':_0x49adb6(0x1b1)+_0x14c424+_0x49adb6(0x1fb),'id':_0x263c56});}[_0x282ed4(0x1af)](_0x18c3a4){const _0x493b29=_0x282ed4;return this[_0x493b29(0x208)][_0x493b29(0x20d)](async()=>{const _0x4d8b7e=_0x493b29;this[_0x4d8b7e(0x177)][_0x4d8b7e(0x1d3)][_0x4d8b7e(0x171)](_0x4d8b7e(0x1d4),{'id':_0x18c3a4[_0x4d8b7e(0x1b7)]+':'+_0x18c3a4['id']}),this[_0x4d8b7e(0x184)](null);});}async[_0x282ed4(0x1fc)](_0x406a21){const _0x2331a3=_0x282ed4,_0x14f572=_0x27296f(this[_0x2331a3(0x18e)]);if(_0x14f572){const _0x14c031=_0x14f572[_0x2331a3(0x20f)][_0x2331a3(0x20a)](_0x2331a3(0x174));_0x14c031&&!this[_0x2331a3(0x1f9)]&&(this[_0x2331a3(0x1f9)]=!0x0,this[_0x2331a3(0x177)][_0x2331a3(0x1d3)][_0x2331a3(0x181)](_0x2331a3(0x189))['to'](_0x14c031,_0x2331a3(0x1cc)));}return this[_0x2331a3(0x208)][_0x2331a3(0x20d)](async()=>{const _0x345689=_0x2331a3;this[_0x345689(0x177)][_0x345689(0x1d3)][_0x345689(0x171)](_0x345689(0x1a3),{'id':_0x406a21[_0x345689(0x1b7)]+':'+_0x406a21['id'],'areActionsDisabled':_0x406a21[_0x345689(0x1ab)],'showDiff':this[_0x345689(0x20b)],'dropdownConfig':this[_0x345689(0x18e)][_0x345689(0x188)][_0x345689(0x20a)](_0x345689(0x1de))}),this[_0x345689(0x184)](null);});}[_0x282ed4(0x1bc)](_0x363702,_0x2873de){const _0x6df688=_0x282ed4,_0x1f1144=this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x1e0)][_0x6df688(0x19f)];if(_0x1f1144 instanceof _0x3fb43e)return this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x1e0)][_0x6df688(0x1d5)](_0x1f1144),void this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x171)](_0x6df688(0x1ac),{'id':_0x363702['id'],'capabilities':{'isWebSearchEnabled':_0x1f1144[_0x6df688(0x1cf)][_0x6df688(0x1e6)]||_0x2873de[_0x6df688(0x1e6)],'isReasoningEnabled':_0x1f1144[_0x6df688(0x1cf)][_0x6df688(0x1c5)]||_0x2873de[_0x6df688(0x1c5)]}});this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x171)](_0x6df688(0x1ac),{'id':_0x363702['id'],'capabilities':_0x2873de});}[_0x282ed4(0x1f3)](_0x489a21){const _0x4da0fa=_0x282ed4,_0x4a9ade=this[_0x4da0fa(0x177)][_0x4da0fa(0x1d3)][_0x4da0fa(0x1e0)][_0x4da0fa(0x1a8)](_0x58cd27=>_0x58cd27[_0x4da0fa(0x1aa)]['id']==_0x489a21['id']&&_0x58cd27 instanceof _0x3fb43e);_0x4a9ade&&_0x4a9ade[_0x4da0fa(0x1b4)](_0x4da0fa(0x1d6),_0x489a21[_0x4da0fa(0x1d6)]);}async[_0x282ed4(0x176)](_0x38dab2){const _0x2b2ede=_0x282ed4,_0x16cb0f=_0x38dab2[_0x2b2ede(0x1ee)]||this[_0x2b2ede(0x18c)];return this[_0x2b2ede(0x208)][_0x2b2ede(0x20d)](async _0x3dda41=>{const _0x3f4ce5=_0x2b2ede;await this[_0x3f4ce5(0x177)][_0x3f4ce5(0x1d3)][_0x3f4ce5(0x1a6)]({..._0x38dab2,'abortSignal':_0x3dda41,'renderingStrategy':_0x16cb0f}),_0x38dab2[_0x3f4ce5(0x1ed)]&&this[_0x3f4ce5(0x17a)](_0x38dab2['id']);});}[_0x282ed4(0x210)](_0x480222,_0x4766b9){const _0x2fd841=_0x282ed4;this[_0x2fd841(0x177)][_0x2fd841(0x1d3)][_0x2fd841(0x1cd)](_0x480222,_0x4766b9);}async[_0x282ed4(0x1ff)](_0x385ec1){const _0x2d76d6=_0x282ed4,_0x224bae=_0x385ec1[_0x2d76d6(0x1ee)]||this[_0x2d76d6(0x18c)];return this[_0x2d76d6(0x208)][_0x2d76d6(0x20d)](async _0x9ec25d=>{const _0x3ddee4=_0x2d76d6;await this[_0x3ddee4(0x177)][_0x3ddee4(0x1d3)][_0x3ddee4(0x17f)]({..._0x385ec1,'abortSignal':_0x9ec25d,'renderingStrategy':_0x224bae}),_0x385ec1[_0x3ddee4(0x1ed)]&&this[_0x3ddee4(0x17a)](_0x385ec1['id']);});}[_0x282ed4(0x1be)](_0x451133){const _0x503b92=_0x282ed4;this[_0x503b92(0x177)][_0x503b92(0x1d3)][_0x503b92(0x1c7)](_0x451133);}[_0x282ed4(0x17a)](_0xf7a0f3){const _0x340627=_0x282ed4;this[_0x340627(0x177)][_0x340627(0x1d3)][_0x340627(0x17b)](_0xf7a0f3);}[_0x282ed4(0x1c9)](_0x26a3be){const _0x595a12=_0x282ed4;this[_0x595a12(0x177)][_0x595a12(0x1d3)][_0x595a12(0x178)]()[_0x595a12(0x180)](_0x45ae70=>_0x45ae70[_0x595a12(0x1b6)](_0x26a3be))[_0x595a12(0x193)](_0x4a9f94=>this[_0x595a12(0x177)][_0x595a12(0x1d3)][_0x595a12(0x1e7)](_0x4a9f94));}[_0x282ed4(0x1dc)](){const _0x31497b=_0x282ed4;this[_0x31497b(0x184)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x31497b(0x177)][_0x31497b(0x1ad)][_0x31497b(0x1e8)](!this[_0x31497b(0x18e)][_0x31497b(0x188)][_0x31497b(0x20a)](_0x31497b(0x18a))),this[_0x31497b(0x1c3)]=!0x0,this[_0x31497b(0x177)][_0x31497b(0x1d3)][_0x31497b(0x1b8)]();}[_0x282ed4(0x1f7)](_0x4130ad){const _0xe3452d=_0x282ed4;this[_0xe3452d(0x208)][_0xe3452d(0x1bb)](),this[_0xe3452d(0x177)][_0xe3452d(0x1d3)][_0xe3452d(0x178)]()[_0xe3452d(0x180)](_0x57e485=>_0x57e485[_0xe3452d(0x1b6)](_0x4130ad['id']))[_0xe3452d(0x193)](_0x74c8fd=>this[_0xe3452d(0x17a)](_0x74c8fd)),this[_0xe3452d(0x1c3)]=!0x1,this[_0xe3452d(0x177)][_0xe3452d(0x1d3)][_0xe3452d(0x1db)]();}async[_0x282ed4(0x20c)](){const _0x135e91=_0x282ed4;return this[_0x135e91(0x208)][_0x135e91(0x1f1)][_0x135e91(0x1e2)](()=>{const _0x386a01=_0x135e91;this[_0x386a01(0x1c3)]=!0x1,this[_0x386a01(0x177)][_0x386a01(0x1d3)][_0x386a01(0x1db)]();});}[_0x282ed4(0x1f0)](_0x22e809,_0xb5a2ab){const _0x717e8c=_0x282ed4;this[_0x717e8c(0x177)][_0x717e8c(0x1ad)][_0x717e8c(0x1f0)](_0x22e809,_0xb5a2ab);}[_0x282ed4(0x17e)](_0x3a520b){const _0x1c30fe=_0x282ed4;this[_0x1c30fe(0x177)][_0x1c30fe(0x1ad)][_0x1c30fe(0x17e)](_0x3a520b);}[_0x282ed4(0x198)](_0xb48ad,_0x58fe86){const _0x21c0b9=_0x282ed4;this[_0x21c0b9(0x177)][_0x21c0b9(0x1ad)][_0x21c0b9(0x198)](_0xb48ad,_0x58fe86);}[_0x282ed4(0x1a0)](_0x4832fc){const _0x2735b3=_0x282ed4;this[_0x2735b3(0x177)][_0x2735b3(0x1ad)][_0x2735b3(0x1a0)](_0x4832fc);}[_0x282ed4(0x1e1)](_0x45e4df){const _0x490db9=_0x282ed4;this[_0x490db9(0x177)][_0x490db9(0x1ad)][_0x490db9(0x1e1)](_0x45e4df);}[_0x282ed4(0x1d0)](){const _0x4c05cd=_0x282ed4;this[_0x4c05cd(0x177)][_0x4c05cd(0x1ad)][_0x4c05cd(0x1d0)]();}[_0x282ed4(0x194)](){const _0x2b029c=_0x282ed4;this[_0x2b029c(0x177)][_0x2b029c(0x1ad)][_0x2b029c(0x194)]();}[_0x282ed4(0x18f)](_0x4dd00b,_0x277a5b,_0x54406f){const _0x10806c=_0x282ed4;this[_0x10806c(0x177)][_0x10806c(0x1ad)][_0x10806c(0x18f)](_0x4dd00b,_0x277a5b,_0x54406f);}[_0x282ed4(0x1ef)](){const _0x81f4db=_0x282ed4;this[_0x81f4db(0x177)][_0x81f4db(0x1ad)][_0x81f4db(0x1ef)](),this[_0x81f4db(0x177)][_0x81f4db(0x1ad)][_0x81f4db(0x19d)](this[_0x81f4db(0x18d)]());}[_0x282ed4(0x183)](_0x586c7f){const _0x4a155c=_0x282ed4;this[_0x4a155c(0x177)][_0x4a155c(0x1ad)][_0x4a155c(0x183)](_0x586c7f);}[_0x282ed4(0x1a4)](_0x32870b){const _0x5a7c04=_0x282ed4;this[_0x5a7c04(0x177)][_0x5a7c04(0x1ad)][_0x5a7c04(0x1cb)](_0x32870b[_0x5a7c04(0x1e6)]),this[_0x5a7c04(0x177)][_0x5a7c04(0x1ad)][_0x5a7c04(0x1b3)](_0x32870b[_0x5a7c04(0x1c5)]),this[_0x5a7c04(0x177)][_0x5a7c04(0x1ad)][_0x5a7c04(0x19d)](this[_0x5a7c04(0x18d)](_0x32870b));}[_0x282ed4(0x1bf)](_0x38066e,_0x17a58b){const _0xfa38d6=_0x282ed4;this[_0xfa38d6(0x177)][_0xfa38d6(0x1ad)][_0xfa38d6(0x19c)](_0x38066e),_0x17a58b&&this[_0xfa38d6(0x177)][_0xfa38d6(0x1ad)][_0xfa38d6(0x1e8)](!0x1);}[_0x282ed4(0x1d9)](_0x33fd59){const _0x5abe5d=_0x282ed4;this[_0x5abe5d(0x18c)]=_0x33fd59;}[_0x282ed4(0x1f2)](_0x133507){const _0x6cef39=_0x282ed4;this[_0x6cef39(0x177)][_0x6cef39(0x1d3)][_0x6cef39(0x1f2)](_0x133507);}[_0x282ed4(0x1d8)](){const _0x43efa1=_0x282ed4;this[_0x43efa1(0x185)](_0x19279e(this[_0x43efa1(0x18e)][_0x43efa1(0x1dd)],_0x43efa1(0x1fe)));}[_0x282ed4(0x185)](_0x2b852b,_0x5992a1=!0x1){const _0x487288=_0x282ed4;if(_0x5992a1&&!_0x22b608()&&_0x2b852b[_0x487288(0x191)])return this[_0x487288(0x177)][_0x487288(0x1f4)][_0x487288(0x16f)]='',void this[_0x487288(0x1b2)](_0x2b852b);this[_0x487288(0x177)][_0x487288(0x1f4)][_0x487288(0x16f)]=_0x2b852b;}[_0x282ed4(0x184)](_0x1f6195){const _0x530d87=_0x282ed4,_0x7b9253=this[_0x530d87(0x1ce)](_0x1f6195);this[_0x530d87(0x177)][_0x530d87(0x1d3)][_0x530d87(0x184)](_0x7b9253);}[_0x282ed4(0x1b2)](_0x5a8f34){const _0x348ed2=_0x282ed4;let _0x379d30=0x0;clearInterval(this[_0x348ed2(0x1ec)]),this[_0x348ed2(0x1ec)]=setInterval(()=>{const _0x5dcca4=_0x348ed2;this[_0x5dcca4(0x177)][_0x5dcca4(0x1f4)][_0x5dcca4(0x16f)]=this[_0x5dcca4(0x177)][_0x5dcca4(0x1f4)][_0x5dcca4(0x16f)]+_0x5a8f34[_0x379d30],_0x379d30++,_0x379d30===_0x5a8f34[_0x5dcca4(0x191)]&&clearInterval(this[_0x5dcca4(0x1ec)]);},0x1e);}[_0x282ed4(0x190)](_0xd94442){const _0x434c37=_0x282ed4;this[_0x434c37(0x177)][_0x434c37(0x1f4)][_0x434c37(0x1a7)]=_0xd94442;}[_0x282ed4(0x1ce)](_0x2114c9){const _0x48d86f=_0x282ed4;return _0x2114c9?_0x2114c9[_0x48d86f(0x1e6)]&&_0x2114c9[_0x48d86f(0x1c5)]?_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x200)):_0x2114c9[_0x48d86f(0x1e6)]?_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x1a5)):_0x2114c9[_0x48d86f(0x1c5)]?_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x1ca)):_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x196)):'';}[_0x282ed4(0x18d)](_0x4d671a){const _0x40c550=_0x282ed4;return _0x4d671a?_0x4d671a[_0x40c550(0x1e6)]&&_0x4d671a[_0x40c550(0x1c5)]?_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x186)):_0x4d671a[_0x40c550(0x1e6)]?_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1ea)):_0x4d671a[_0x40c550(0x1c5)]?_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1df)):_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1c1)):_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1c1));}[_0x282ed4(0x172)](_0x45b7c4,_0x2817de,_0x53c5c9,_0x1b4f95){const _0x3465e3=_0x282ed4;this[_0x3465e3(0x177)][_0x3465e3(0x172)](_0x45b7c4,_0x2817de,_0x53c5c9,_0x1b4f95);}[_0x282ed4(0x1e4)](_0x13a001){const _0x384c87=_0x282ed4;this[_0x384c87(0x177)][_0x384c87(0x1e4)](_0x13a001);}[_0x282ed4(0x19b)](){const _0x20762b=_0x282ed4;this[_0x20762b(0x177)][_0x20762b(0x1ad)][_0x20762b(0x19b)]();}[_0x282ed4(0x1a1)](_0x5b9318,_0x5c8f7c){const _0x1b4c69=_0x282ed4;this[_0x1b4c69(0x177)][_0x1b4c69(0x1d3)][_0x1b4c69(0x1a9)](_0x5b9318,_0x5c8f7c);}[_0x282ed4(0x1e9)](){const _0x128fd2=_0x282ed4;this[_0x128fd2(0x177)][_0x128fd2(0x1ad)][_0x128fd2(0x17c)]=!0x0;}[_0x282ed4(0x1e5)](){const _0xdb66e3=_0x282ed4;this[_0xdb66e3(0x177)][_0xdb66e3(0x1ad)][_0xdb66e3(0x17c)]=!0x1;}}
|
|
23
|
+
const _0x96ee03=_0x5da8;(function(_0x55c0e0,_0x4ee2da){const _0x5153af=_0x5da8,_0x28ffb7=_0x55c0e0();while(!![]){try{const _0x3e6c81=-parseInt(_0x5153af(0x230))/0x1+-parseInt(_0x5153af(0x249))/0x2*(-parseInt(_0x5153af(0x20d))/0x3)+parseInt(_0x5153af(0x1b6))/0x4*(-parseInt(_0x5153af(0x1c3))/0x5)+-parseInt(_0x5153af(0x1e3))/0x6*(-parseInt(_0x5153af(0x234))/0x7)+-parseInt(_0x5153af(0x1c8))/0x8+-parseInt(_0x5153af(0x1e6))/0x9*(-parseInt(_0x5153af(0x1ab))/0xa)+parseInt(_0x5153af(0x1c0))/0xb;if(_0x3e6c81===_0x4ee2da)break;else _0x28ffb7['push'](_0x28ffb7['shift']());}catch(_0x16e4d5){_0x28ffb7['push'](_0x28ffb7['shift']());}}}(_0x3b66,0x77137));function _0x5da8(_0x1bf337,_0x2436a4){const _0x3b66fe=_0x3b66();return _0x5da8=function(_0x5da85a,_0x2a9386){_0x5da85a=_0x5da85a-0x1a8;let _0x4440c5=_0x3b66fe[_0x5da85a];return _0x4440c5;},_0x5da8(_0x1bf337,_0x2436a4);}import{ContextPlugin as _0x2db6d2}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x5ae8f3}from'ckeditor5/src/utils.js';import{AIChatView as _0xfd39a8}from'./ui/aichatview.js';import{AITabs as _0x1ee438}from'../aitabs/aitabs.js';import{getTranslation as _0x583fee}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x547b2f}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x1bd4c9}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x2f323a}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3f74b4}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x3b66(){const _0x30058e=['disableModelSelector','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','bind','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','AI_CHAT_WELCOME_MESSAGE','capabilities','isDisabled','isReasoningEnabled','last','toggleLoadingSkeleton','setLoadingMessage','_interactionPromiseResolver','chatFeed','isVisible','setIsUploadInProgress','isDone','_view','markItemAsDone','setWebSearch','enableModelSelector','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','commands','length','213dJLOjx','streaming','_titleAnimationInterval','focusPromptInput','areActionsDisabled','_isTrackChangesCommandValueBound','user-message','setContextItemLoading','_animateConversationTitle','error-message','setSelectedModel','pluginName','isTrackChangesOn','setConversationTitle','updateResourceState','abort','options','showDiff','stopInteraction','chatControls','removeItem','resetConversationTitle','find','removeFeedInteraction','<p>','setAddContextOptions','ai.availableReplyActions','updateFeedItemAIReplySuggestionPartState','showResizeButton','isOfficialPlugin','startsWith','addItem','updateWebSources','setReasoning','get','832552mEhlbu','quickActionData','isBusy','locale','1057mNnvEW','delegate','scrollToSuggestion','addFeedItemAISuggestion','conversation-start','addFeedItemAIReply','requires','startInteraction','clear','setConversationContext','scrollFeedToSuggestion','updateCapabilities','label','updateReplyItem','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','_promiseQueue','queueEmptyPromise','isWebSearchEnabled','trackChanges','isModelAvailable','isMaximized','10078lzjDnL','resetMessageInput','updateSuggestionItem','userMessage','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','updateFeedItemAIReplySuggestionContent','160TyFKul','clearPendingContextUI','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','then','AIChatUI','createConversation','forEach','startAutoScroll','updateSuggestionPartState','ai-reply','closeSourceResourceBalloon','12mXPiOv','filter','setIsMaximized','value','availableModels','ai.chat.models.modelSelectorAlwaysVisible','interactionId','AI_CHAT_HEADING','addContextItem','populateSourceResourceBalloon','7858345DGpHZv','enqueue','addFeedInteractionHeader','1320055oMeQoL','renderingStrategy','setModel','from','updateFeedItemAIReplySources','20976DWRYbP','_getLoadingMessage','enableControls','addFeedItemStaticMessage','isPending','set','finishInteraction','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','updateFeedItemAIReplyContent','destroy','addFeedItemError','setFeedItemRenderingStrategy','markFeedItemAsDone','setModelList','updateFeedInteractionHeader','plugins','ai-suggestion-reply','chatHeader','displayedPrompt','context','addTab','getItemIds','view','</p>','removeContextItem','setInputPlaceholder','stopAutoScroll','14244kdnDcE','toggleSuggestionDisplayMode','isLoading','384921lAwwNk','remove','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','children','chat','addFeedItemUserMessage','interaction-header','clearConversationContextUI','AITabs','feedItemRenderingStrategy','contextItems','values','isPremiumPlugin','disableControls','_getInputPlaceholder','config'];_0x3b66=function(){return _0x30058e;};return _0x3b66();}import{getEditorFromContext as _0x5c9005}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x2db6d2{static get[_0x96ee03(0x23a)](){return[_0x1ee438];}[_0x96ee03(0x206)];static get[_0x96ee03(0x218)](){const _0x11d963=_0x96ee03;return _0x11d963(0x1af);}static get[_0x96ee03(0x22a)](){return!0x0;}static get[_0x96ee03(0x1f2)](){return!0x0;}[_0x96ee03(0x1ef)]=_0x96ee03(0x20e);[_0x96ee03(0x21e)]=!0x0;[_0x96ee03(0x243)];[_0x96ee03(0x201)];[_0x96ee03(0x20f)]=void 0x0;[_0x96ee03(0x212)]=!0x1;constructor(_0xf7cbf3){const _0x50b0a7=_0x96ee03;super(_0xf7cbf3);const _0x5cbe22=this[_0x50b0a7(0x1db)][_0x50b0a7(0x1d7)][_0x50b0a7(0x22f)](_0x50b0a7(0x1ee));this[_0x50b0a7(0x1cd)](_0x50b0a7(0x232),!0x1),this[_0x50b0a7(0x243)]=new _0x2f323a(),this[_0x50b0a7(0x206)]=new _0xfd39a8(this[_0x50b0a7(0x1db)][_0x50b0a7(0x233)],_0x5cbe22[_0x50b0a7(0x229)]),this[_0x50b0a7(0x206)][_0x50b0a7(0x235)](..._0x3f74b4)['to'](this),this[_0x50b0a7(0x206)]['on'](_0x50b0a7(0x1e4),(_0x3ba778,{showDiff:_0x2a07ff})=>{const _0x577df4=_0x50b0a7;this[_0x577df4(0x21e)]=_0x2a07ff;}),_0x5cbe22[_0x50b0a7(0x1de)][_0x50b0a7(0x1dc)]({'id':_0x50b0a7(0x1ea),'buttonLabel':_0x583fee(this[_0x50b0a7(0x1db)][_0x50b0a7(0x233)],_0x50b0a7(0x1bd)),'buttonIcon':_0x547b2f,'order':0x0,'content':this[_0x50b0a7(0x206)]}),this[_0x50b0a7(0x206)][_0x50b0a7(0x220)][_0x50b0a7(0x1f8)](_0x50b0a7(0x1e5))['to'](this,_0x50b0a7(0x232),_0x18a8b7=>_0x18a8b7),this[_0x50b0a7(0x206)][_0x50b0a7(0x202)][_0x50b0a7(0x1f8)](_0x50b0a7(0x1cc))['to'](this,_0x50b0a7(0x232),_0x563d2a=>_0x563d2a),this[_0x50b0a7(0x206)][_0x50b0a7(0x220)][_0x50b0a7(0x1e1)](this[_0x50b0a7(0x1f4)]()),this[_0x50b0a7(0x1f8)](_0x50b0a7(0x247))['to'](this[_0x50b0a7(0x206)][_0x50b0a7(0x220)],_0x50b0a7(0x247));}[_0x96ee03(0x1d1)](){const _0xe0d1fd=_0x96ee03;super[_0xe0d1fd(0x1d1)](),this[_0xe0d1fd(0x20f)]&&clearInterval(this[_0xe0d1fd(0x20f)]);}[_0x96ee03(0x1b0)](_0xb35c6c){const _0x36c4fa=_0x96ee03;this[_0x36c4fa(0x206)][_0x36c4fa(0x202)][_0x36c4fa(0x23c)](),this[_0x36c4fa(0x206)][_0x36c4fa(0x220)][_0x36c4fa(0x209)](),this[_0x36c4fa(0x206)][_0x36c4fa(0x220)][_0x36c4fa(0x1d5)](_0xb35c6c[_0x36c4fa(0x1ba)],!this[_0x36c4fa(0x1db)][_0x36c4fa(0x1f5)][_0x36c4fa(0x22f)](_0x36c4fa(0x1bb))),this[_0x36c4fa(0x1cb)]({'id':_0x36c4fa(0x238),'staticMessage':_0x583fee(this[_0x36c4fa(0x1db)][_0x36c4fa(0x233)],_0x36c4fa(0x1fa))});}[_0x96ee03(0x1cb)]({id:_0x47ebdb,staticMessage:_0x1ebf44}){const _0x269063=_0x96ee03;this[_0x269063(0x206)][_0x269063(0x202)][_0x269063(0x22c)](_0x269063(0x1b4),{'id':_0x47ebdb,'initialContent':_0x269063(0x225)+_0x1ebf44+_0x269063(0x1df)});}[_0x96ee03(0x1eb)](_0x29cec3){const _0xf6324f=_0x96ee03,_0x4ea37a=_0x29cec3[_0xf6324f(0x231)]?.[_0xf6324f(0x1da)]||_0x29cec3[_0xf6324f(0x1a8)];this[_0xf6324f(0x206)][_0xf6324f(0x202)][_0xf6324f(0x22c)](_0xf6324f(0x213),{'contextItems':Array[_0xf6324f(0x1c6)](_0x29cec3[_0xf6324f(0x1f0)][_0xf6324f(0x1f1)]()),'initialContent':_0xf6324f(0x225)+_0x4ea37a+_0xf6324f(0x1df),'id':_0x29cec3['id']});}[_0x96ee03(0x1d2)]({errorMessage:_0x27b757,id:_0x5e1018}){const _0x3e4fb9=_0x96ee03;this[_0x3e4fb9(0x206)][_0x3e4fb9(0x202)][_0x3e4fb9(0x22c)](_0x3e4fb9(0x216),{'initialContent':_0x3e4fb9(0x225)+_0x27b757+_0x3e4fb9(0x1df),'id':_0x5e1018});}[_0x96ee03(0x239)](_0x1850a1){const _0x4bdd02=_0x96ee03;return this[_0x4bdd02(0x243)][_0x4bdd02(0x1c1)](async()=>{const _0x1e5eec=_0x4bdd02;this[_0x1e5eec(0x206)][_0x1e5eec(0x202)][_0x1e5eec(0x22c)](_0x1e5eec(0x1b4),{'id':_0x1850a1[_0x1e5eec(0x1bc)]+':'+_0x1850a1['id']}),this[_0x1e5eec(0x200)](null);});}async[_0x96ee03(0x237)](_0x40b253){const _0x4a53e5=_0x96ee03,_0x3e5e8f=_0x5c9005(this[_0x4a53e5(0x1db)]);if(_0x3e5e8f){const _0xbb842f=_0x3e5e8f[_0x4a53e5(0x20b)][_0x4a53e5(0x22f)](_0x4a53e5(0x246));_0xbb842f&&!this[_0x4a53e5(0x212)]&&(this[_0x4a53e5(0x212)]=!0x0,this[_0x4a53e5(0x206)][_0x4a53e5(0x202)][_0x4a53e5(0x1f8)](_0x4a53e5(0x219))['to'](_0xbb842f,_0x4a53e5(0x1b9)));}return this[_0x4a53e5(0x243)][_0x4a53e5(0x1c1)](async()=>{const _0x2f3fa0=_0x4a53e5;this[_0x2f3fa0(0x206)][_0x2f3fa0(0x202)][_0x2f3fa0(0x22c)](_0x2f3fa0(0x1d8),{'id':_0x40b253[_0x2f3fa0(0x1bc)]+':'+_0x40b253['id'],'areActionsDisabled':_0x40b253[_0x2f3fa0(0x211)],'showDiff':this[_0x2f3fa0(0x21e)],'dropdownConfig':this[_0x2f3fa0(0x1db)][_0x2f3fa0(0x1f5)][_0x2f3fa0(0x22f)](_0x2f3fa0(0x227))}),this[_0x2f3fa0(0x200)](null);});}[_0x96ee03(0x1c2)](_0x2a8385,_0x2aabfe){const _0x4778d6=_0x96ee03,_0x5b5984=this[_0x4778d6(0x206)][_0x4778d6(0x202)][_0x4778d6(0x1e9)][_0x4778d6(0x1fe)];if(_0x5b5984 instanceof _0x1bd4c9)return this[_0x4778d6(0x206)][_0x4778d6(0x202)][_0x4778d6(0x1e9)][_0x4778d6(0x1e7)](_0x5b5984),void this[_0x4778d6(0x206)][_0x4778d6(0x202)][_0x4778d6(0x22c)](_0x4778d6(0x1ec),{'id':_0x2a8385['id'],'capabilities':{'isWebSearchEnabled':_0x5b5984[_0x4778d6(0x1fb)][_0x4778d6(0x245)]||_0x2aabfe[_0x4778d6(0x245)],'isReasoningEnabled':_0x5b5984[_0x4778d6(0x1fb)][_0x4778d6(0x1fd)]||_0x2aabfe[_0x4778d6(0x1fd)]}});this[_0x4778d6(0x206)][_0x4778d6(0x202)][_0x4778d6(0x22c)](_0x4778d6(0x1ec),{'id':_0x2a8385['id'],'capabilities':_0x2aabfe});}[_0x96ee03(0x1d6)](_0x3fc664){const _0x21bd3f=_0x96ee03,_0xddfe37=this[_0x21bd3f(0x206)][_0x21bd3f(0x202)][_0x21bd3f(0x1e9)][_0x21bd3f(0x223)](_0x2c1138=>_0x2c1138[_0x21bd3f(0x21d)]['id']==_0x3fc664['id']&&_0x2c1138 instanceof _0x1bd4c9);_0xddfe37&&_0xddfe37[_0x21bd3f(0x1cd)](_0x21bd3f(0x203),_0x3fc664[_0x21bd3f(0x203)]);}async[_0x96ee03(0x1d0)](_0x6ec4fb){const _0x18450c=_0x96ee03,_0x20f52b=_0x6ec4fb[_0x18450c(0x1c4)]||this[_0x18450c(0x1ef)];return this[_0x18450c(0x243)][_0x18450c(0x1c1)](async _0x402c4a=>{const _0x526f0d=_0x18450c;await this[_0x526f0d(0x206)][_0x526f0d(0x202)][_0x526f0d(0x241)]({..._0x6ec4fb,'abortSignal':_0x402c4a,'renderingStrategy':_0x20f52b}),_0x6ec4fb[_0x526f0d(0x205)]&&this[_0x526f0d(0x1d4)](_0x6ec4fb['id']);});}[_0x96ee03(0x1c7)](_0x50fad2,_0x10fb99){const _0x5a807a=_0x96ee03;this[_0x5a807a(0x206)][_0x5a807a(0x202)][_0x5a807a(0x22d)](_0x50fad2,_0x10fb99);}async[_0x96ee03(0x1aa)](_0x5cb161){const _0x310b4a=_0x96ee03,_0x24ee11=_0x5cb161[_0x310b4a(0x1c4)]||this[_0x310b4a(0x1ef)];return this[_0x310b4a(0x243)][_0x310b4a(0x1c1)](async _0x9bc1f4=>{const _0x287d3c=_0x310b4a;await this[_0x287d3c(0x206)][_0x287d3c(0x202)][_0x287d3c(0x24b)]({..._0x5cb161,'abortSignal':_0x9bc1f4,'renderingStrategy':_0x24ee11}),_0x5cb161[_0x287d3c(0x205)]&&this[_0x287d3c(0x1d4)](_0x5cb161['id']);});}[_0x96ee03(0x228)](_0x4f4a64){const _0x5c0fae=_0x96ee03;this[_0x5c0fae(0x206)][_0x5c0fae(0x202)][_0x5c0fae(0x1b3)](_0x4f4a64);}[_0x96ee03(0x1d4)](_0x1dafa6){const _0x42f1dc=_0x96ee03;this[_0x42f1dc(0x206)][_0x42f1dc(0x202)][_0x42f1dc(0x207)](_0x1dafa6);}[_0x96ee03(0x224)](_0xbd6ff1){const _0x474b28=_0x96ee03;this[_0x474b28(0x206)][_0x474b28(0x202)][_0x474b28(0x1dd)]()[_0x474b28(0x1b7)](_0x2da1ab=>_0x2da1ab[_0x474b28(0x22b)](_0xbd6ff1))[_0x474b28(0x1b1)](_0x364346=>this[_0x474b28(0x206)][_0x474b28(0x202)][_0x474b28(0x221)](_0x364346));}[_0x96ee03(0x23b)](){const _0x304d7c=_0x96ee03;this[_0x304d7c(0x200)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x304d7c(0x206)][_0x304d7c(0x220)][_0x304d7c(0x1f6)](!this[_0x304d7c(0x1db)][_0x304d7c(0x1f5)][_0x304d7c(0x22f)](_0x304d7c(0x1bb))),this[_0x304d7c(0x232)]=!0x0,this[_0x304d7c(0x206)][_0x304d7c(0x202)][_0x304d7c(0x1b2)]();}[_0x96ee03(0x21f)](_0x5498e7){const _0x3bcf76=_0x96ee03;this[_0x3bcf76(0x243)][_0x3bcf76(0x21c)](),this[_0x3bcf76(0x206)][_0x3bcf76(0x202)][_0x3bcf76(0x1dd)]()[_0x3bcf76(0x1b7)](_0x1cba3e=>_0x1cba3e[_0x3bcf76(0x22b)](_0x5498e7['id']))[_0x3bcf76(0x1b1)](_0x4a0a0e=>this[_0x3bcf76(0x1d4)](_0x4a0a0e)),this[_0x3bcf76(0x232)]=!0x1,this[_0x3bcf76(0x206)][_0x3bcf76(0x202)][_0x3bcf76(0x1e2)]();}async[_0x96ee03(0x1ce)](){const _0x4adccc=_0x96ee03;return this[_0x4adccc(0x243)][_0x4adccc(0x244)][_0x4adccc(0x1ae)](()=>{const _0x5253e2=_0x4adccc;this[_0x5253e2(0x232)]=!0x1,this[_0x5253e2(0x206)][_0x5253e2(0x202)][_0x5253e2(0x1e2)]();});}[_0x96ee03(0x1be)](_0x1c2c94,_0x50f2d5){const _0x16036b=_0x96ee03;this[_0x16036b(0x206)][_0x16036b(0x220)][_0x16036b(0x1be)](_0x1c2c94,_0x50f2d5);}[_0x96ee03(0x1e0)](_0xf9f492){const _0x1c881d=_0x96ee03;this[_0x1c881d(0x206)][_0x1c881d(0x220)][_0x1c881d(0x1e0)](_0xf9f492);}[_0x96ee03(0x214)](_0x250c4a,_0x23af1f){const _0x47b0c0=_0x96ee03;this[_0x47b0c0(0x206)][_0x47b0c0(0x220)][_0x47b0c0(0x214)](_0x250c4a,_0x23af1f);}[_0x96ee03(0x204)](_0x53a774){const _0x5a420b=_0x96ee03;this[_0x5a420b(0x206)][_0x5a420b(0x220)][_0x5a420b(0x204)](_0x53a774);}[_0x96ee03(0x23d)](_0x2641b0){const _0xd6dffa=_0x96ee03;this[_0xd6dffa(0x206)][_0xd6dffa(0x220)][_0xd6dffa(0x23d)](_0x2641b0);}[_0x96ee03(0x1ac)](){const _0x9abed9=_0x96ee03;this[_0x9abed9(0x206)][_0x9abed9(0x220)][_0x9abed9(0x1ac)]();}[_0x96ee03(0x1ed)](){const _0x4bc075=_0x96ee03;this[_0x4bc075(0x206)][_0x4bc075(0x220)][_0x4bc075(0x1ed)]();}[_0x96ee03(0x21b)](_0x587c58,_0x549956,_0x25c3e8){const _0xc4438e=_0x96ee03;this[_0xc4438e(0x206)][_0xc4438e(0x220)][_0xc4438e(0x21b)](_0x587c58,_0x549956,_0x25c3e8);}[_0x96ee03(0x24a)](){const _0x390f2a=_0x96ee03;this[_0x390f2a(0x206)][_0x390f2a(0x220)][_0x390f2a(0x24a)](),this[_0x390f2a(0x206)][_0x390f2a(0x220)][_0x390f2a(0x1e1)](this[_0x390f2a(0x1f4)]());}[_0x96ee03(0x226)](_0x1c65ab){const _0x2110e1=_0x96ee03;this[_0x2110e1(0x206)][_0x2110e1(0x220)][_0x2110e1(0x226)](_0x1c65ab);}[_0x96ee03(0x23f)](_0x27b050){const _0x554cd9=_0x96ee03;this[_0x554cd9(0x206)][_0x554cd9(0x220)][_0x554cd9(0x208)](_0x27b050[_0x554cd9(0x245)]),this[_0x554cd9(0x206)][_0x554cd9(0x220)][_0x554cd9(0x22e)](_0x27b050[_0x554cd9(0x1fd)]),this[_0x554cd9(0x206)][_0x554cd9(0x220)][_0x554cd9(0x1e1)](this[_0x554cd9(0x1f4)](_0x27b050));}[_0x96ee03(0x217)](_0x1ebd15,_0x367b94){const _0x7224e=_0x96ee03;this[_0x7224e(0x206)][_0x7224e(0x220)][_0x7224e(0x1c5)](_0x1ebd15),_0x367b94&&this[_0x7224e(0x206)][_0x7224e(0x220)][_0x7224e(0x1f6)](!0x1);}[_0x96ee03(0x1d3)](_0x1a1155){const _0x45696b=_0x96ee03;this[_0x45696b(0x1ef)]=_0x1a1155;}[_0x96ee03(0x1ff)](_0x66bc02){const _0x15b963=_0x96ee03;this[_0x15b963(0x206)][_0x15b963(0x202)][_0x15b963(0x1ff)](_0x66bc02);}[_0x96ee03(0x222)](){const _0x39496a=_0x96ee03;this[_0x39496a(0x21a)](_0x583fee(this[_0x39496a(0x1db)][_0x39496a(0x233)],_0x39496a(0x1bd)));}[_0x96ee03(0x21a)](_0x264681,_0x175bde=!0x1){const _0x52c8eb=_0x96ee03;if(_0x175bde&&!_0x5ae8f3()&&_0x264681[_0x52c8eb(0x20c)])return this[_0x52c8eb(0x206)][_0x52c8eb(0x1d9)][_0x52c8eb(0x240)]='',void this[_0x52c8eb(0x215)](_0x264681);this[_0x52c8eb(0x206)][_0x52c8eb(0x1d9)][_0x52c8eb(0x240)]=_0x264681;}[_0x96ee03(0x200)](_0x9ce72b){const _0x320f09=_0x96ee03,_0x1b2d5d=this[_0x320f09(0x1c9)](_0x9ce72b);this[_0x320f09(0x206)][_0x320f09(0x202)][_0x320f09(0x200)](_0x1b2d5d);}[_0x96ee03(0x215)](_0x56781e){const _0xfdc72d=_0x96ee03;let _0xb6c1d6=0x0;clearInterval(this[_0xfdc72d(0x20f)]),this[_0xfdc72d(0x20f)]=setInterval(()=>{const _0xce2df8=_0xfdc72d;this[_0xce2df8(0x206)][_0xce2df8(0x1d9)][_0xce2df8(0x240)]=this[_0xce2df8(0x206)][_0xce2df8(0x1d9)][_0xce2df8(0x240)]+_0x56781e[_0xb6c1d6],_0xb6c1d6++,_0xb6c1d6===_0x56781e[_0xce2df8(0x20c)]&&clearInterval(this[_0xce2df8(0x20f)]);},0x1e);}[_0x96ee03(0x1b8)](_0x18551a){const _0x9d2b5=_0x96ee03;this[_0x9d2b5(0x206)][_0x9d2b5(0x1d9)][_0x9d2b5(0x248)]=_0x18551a;}[_0x96ee03(0x1c9)](_0x357eb7){const _0x16a2cd=_0x96ee03;return _0x357eb7?_0x357eb7[_0x16a2cd(0x245)]&&_0x357eb7[_0x16a2cd(0x1fd)]?_0x583fee(this[_0x16a2cd(0x1db)][_0x16a2cd(0x233)],_0x16a2cd(0x1f7)):_0x357eb7[_0x16a2cd(0x245)]?_0x583fee(this[_0x16a2cd(0x1db)][_0x16a2cd(0x233)],_0x16a2cd(0x1a9)):_0x357eb7[_0x16a2cd(0x1fd)]?_0x583fee(this[_0x16a2cd(0x1db)][_0x16a2cd(0x233)],_0x16a2cd(0x242)):_0x583fee(this[_0x16a2cd(0x1db)][_0x16a2cd(0x233)],_0x16a2cd(0x1cf)):'';}[_0x96ee03(0x1f4)](_0x11dc40){const _0x2db913=_0x96ee03;return _0x11dc40?_0x11dc40[_0x2db913(0x245)]&&_0x11dc40[_0x2db913(0x1fd)]?_0x583fee(this[_0x2db913(0x1db)][_0x2db913(0x233)],_0x2db913(0x1f9)):_0x11dc40[_0x2db913(0x245)]?_0x583fee(this[_0x2db913(0x1db)][_0x2db913(0x233)],_0x2db913(0x1ad)):_0x11dc40[_0x2db913(0x1fd)]?_0x583fee(this[_0x2db913(0x1db)][_0x2db913(0x233)],_0x2db913(0x20a)):_0x583fee(this[_0x2db913(0x1db)][_0x2db913(0x233)],_0x2db913(0x1e8)):_0x583fee(this[_0x2db913(0x1db)][_0x2db913(0x233)],_0x2db913(0x1e8));}[_0x96ee03(0x1bf)](_0x4f31b4,_0x13516b,_0x5bba3e,_0xb03ca1){const _0x3cbcce=_0x96ee03;this[_0x3cbcce(0x206)][_0x3cbcce(0x1bf)](_0x4f31b4,_0x13516b,_0x5bba3e,_0xb03ca1);}[_0x96ee03(0x1b5)](_0x13fd53){const _0x18867f=_0x96ee03;this[_0x18867f(0x206)][_0x18867f(0x1b5)](_0x13fd53);}[_0x96ee03(0x210)](){const _0x3d38ae=_0x96ee03;this[_0x3d38ae(0x206)][_0x3d38ae(0x220)][_0x3d38ae(0x210)]();}[_0x96ee03(0x23e)](_0x291038,_0x51c05a){const _0x5c6a4e=_0x96ee03;this[_0x5c6a4e(0x206)][_0x5c6a4e(0x202)][_0x5c6a4e(0x236)](_0x291038,_0x51c05a);}[_0x96ee03(0x1f3)](){const _0x52cb5b=_0x96ee03;this[_0x52cb5b(0x206)][_0x52cb5b(0x220)][_0x52cb5b(0x1fc)]=!0x0;}[_0x96ee03(0x1ca)](){const _0x22d8e5=_0x96ee03;this[_0x22d8e5(0x206)][_0x22d8e5(0x220)][_0x22d8e5(0x1fc)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x5c939a=_0x1107;(function(_0x2a08a0,_0x157c9b){const _0x89af44=_0x1107,_0x2eabcd=_0x2a08a0();while(!![]){try{const _0x99e431=-parseInt(_0x89af44(0x144))/0x1*(parseInt(_0x89af44(0x198))/0x2)+-parseInt(_0x89af44(0x15f))/0x3+-parseInt(_0x89af44(0x159))/0x4*(parseInt(_0x89af44(0x1ba))/0x5)+parseInt(_0x89af44(0x172))/0x6*(parseInt(_0x89af44(0x178))/0x7)+-parseInt(_0x89af44(0x195))/0x8+parseInt(_0x89af44(0x1a3))/0x9*(parseInt(_0x89af44(0x1a7))/0xa)+parseInt(_0x89af44(0x182))/0xb;if(_0x99e431===_0x157c9b)break;else _0x2eabcd['push'](_0x2eabcd['shift']());}catch(_0x5c246f){_0x2eabcd['push'](_0x2eabcd['shift']());}}}(_0x1895,0xb9ab4));function _0x1107(_0x2cefd4,_0x526431){const _0x1895be=_0x1895();return _0x1107=function(_0x11075e,_0x5302a4){_0x11075e=_0x11075e-0x144;let _0x3f4672=_0x1895be[_0x11075e];return _0x3f4672;},_0x1107(_0x2cefd4,_0x526431);}import{CKEditorError as _0x2d54ee,ObservableMixin as _0x4b9830,uid as _0x38225f}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x30e74c,AIContextTextResourceType as _0x51d6ab}from'../../aicore/model/aicontext.js';import{escape as _0x21133f}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x5c939a(0x19c),_0x5c939a(0x1b0),_0x5c939a(0x1a6),_0x5c939a(0x189),_0x5c939a(0x17d),_0x5c939a(0x1c3),_0x5c939a(0x183),_0x5c939a(0x16f),_0x5c939a(0x147)];function _0x1895(){const _0x312715=['uploadUrl','_findSourceIdsByResourceId','ai-chat-file-upload-failed','11735984jjUNUG','URL','File','3478GhZnbx','url-','populateFromMessage','values','contextItemAdded','document','forEach','isSelectionInContext','ai-chat-url-upload-failed','_updateResourceInContextState','_getCustomSourcesInitialState','45AADYTy','fire','_connector','contextItemLoadingEnded','2317970wZUXfN','addToConversationContext','getId','start','_setAddContextOptionsDefaultState','find','isInContext','set','abortController','contextItemRemoved','object','urls','_ownerId','ai-chat-document-upload-failed','uploadFile','_finishUploadOperation','isReadOnly','addSelectionToContext','_pendingContextItems','1104745scapTP','_ongoingUploadOperations','map','DOCUMENT','addResourceToContext','MARKDOWN','FILE','TEXT','resources','addContextOptionsChanged','init','all','push','addCurrentDocumentToContext','ai-chat-context-invalid-data','end','ai-chat-source-not-found','removeFromContext','getPendingContextItems','hidden','ai-chat-resource-load-failed','HTML','data','label','sessionId','401hRIXXr','_mapContextItemToRequestData','url','uploadProgressChanged','object\x20with\x20content\x20and\x20type\x20properties','name','_convertTextResourceToFile','text/markdown','files','ai-request-aborted','uploadDocument','version','uiId','file-','delete','enabled','get','has','type','files-','ai-chat-resource-no-data','8ZquoXK','ai-chat-context-unsupported-type','selection','getData','sources','getResources','2499282mVkSqh','removeSelectionFromContext','resourceId','fetchDocument','message','_toggleAddCurrentDocumentOptionVisibility','string','Current\x20document','startsWith','ai-chat-source-resources-load-failed','attributes','loadSourceResources','_finishContextItemLoading','_addContextOptionsState','_removeContextItem','isCurrentDocumentInConversation','resourceStateChanged','isHidden','from','305574uCkCen','_config','abort','_startUploadOperation','getDocument','_conversationContextItems','21FioWBS','size','current-document','text/plain','_ongoingUploads','error','stack','isCurrentDocumentInContext','_addToConversationContextItem','text/html','31768627FWAnBH','sourceResourcesLoaded','content','addFilesToContext','getSentContextItems','filter','mapContextItemsToRequestData','contextSent','addUrlToContext','SELECTION','length','updateCurrentDocument','_isResourceInContext','_addContextItem','clearPendingContextItems','_createContextItemFromContent'];_0x1895=function(){return _0x312715;};return _0x1895();}export class AIChatContext extends _0x4b9830(){[_0x5c939a(0x1a5)];[_0x5c939a(0x173)];[_0x5c939a(0x1b3)];constructor({connector:_0x39664c,config:_0x4e42f3,ownerId:_0x2134ec}){const _0x390383=_0x5c939a;super(),this[_0x390383(0x1a5)]=_0x39664c,this[_0x390383(0x173)]=_0x4e42f3,this[_0x390383(0x1b3)]=_0x2134ec;}[_0x5c939a(0x1c4)](){const _0x16244d=_0x5c939a;this[_0x16244d(0x1b9)]=new Map(),this[_0x16244d(0x177)]=new Map(),this[_0x16244d(0x17c)]=new Map(),this[_0x16244d(0x1bb)]=new Map(),this[_0x16244d(0x1ab)]();}[_0x5c939a(0x1cc)](){const _0x342aff=_0x5c939a;return this[_0x342aff(0x1b9)];}async[_0x5c939a(0x19a)](_0x33369b){const _0x97a168=_0x5c939a,_0x33a2f9=await this[_0x97a168(0x191)](_0x33369b);return this[_0x97a168(0x180)](_0x33a2f9),_0x97a168(0x17a)===_0x33a2f9[_0x97a168(0x150)]&&this[_0x97a168(0x164)](),_0x33a2f9;}async[_0x5c939a(0x191)](_0x5132cd){const _0x3f7e2e=_0x5c939a;if(_0x5132cd[_0x3f7e2e(0x156)]===_0x30e74c[_0x3f7e2e(0x1bd)]){const _0x2919da=await this[_0x3f7e2e(0x1a5)][_0x3f7e2e(0x162)](this[_0x3f7e2e(0x1b3)],_0x5132cd['id'])[_0x3f7e2e(0x176)]();return{'id':_0x3f7e2e(0x17a),'uiId':_0x3f7e2e(0x17a),'label':_0x3f7e2e(0x166),'type':_0x5132cd[_0x3f7e2e(0x156)],'content':_0x2919da[_0x3f7e2e(0x184)],'hidden':this[_0x3f7e2e(0x177)][_0x3f7e2e(0x155)](_0x3f7e2e(0x17a)),'version':_0x2919da[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x14f)],'sessionId':_0x2919da[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x1d2)]};}return{'id':_0x5132cd['id'],'uiId':_0x5132cd['id'],'label':_0x5132cd[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x1d1)]||_0x5132cd[_0x3f7e2e(0x149)]||_0x5132cd[_0x3f7e2e(0x146)]||_0x5132cd['id'],'type':_0x5132cd[_0x3f7e2e(0x156)],..._0x5132cd?.[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x161)]?{'resourceId':_0x5132cd[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x161)]}:{}};}[_0x5c939a(0x186)](){const _0x251470=_0x5c939a;return new Map(this[_0x251470(0x177)]);}[_0x5c939a(0x1cb)](_0x20fa1c){const _0x41bb14=_0x5c939a,_0x117c79=this[_0x41bb14(0x1b9)][_0x41bb14(0x154)](_0x20fa1c);_0x117c79?.[_0x41bb14(0x1b7)]||this[_0x41bb14(0x16d)](_0x20fa1c);}[_0x5c939a(0x190)](){const _0x4afc95=_0x5c939a;if(0x0===this[_0x4afc95(0x1b9)][_0x4afc95(0x179)])return;for(const _0x17106a of this[_0x4afc95(0x1b9)][_0x4afc95(0x19b)]())this[_0x4afc95(0x16d)](_0x17106a[_0x4afc95(0x150)]);const _0x562ee7=this[_0x4afc95(0x177)][_0x4afc95(0x154)](_0x4afc95(0x17a))||this[_0x4afc95(0x1b9)][_0x4afc95(0x154)](_0x4afc95(0x17a));_0x562ee7&&this[_0x4afc95(0x18f)]({..._0x562ee7,'isReadOnly':!0x0,'hidden':!0x0});}[_0x5c939a(0x1a8)](_0x576928){const _0x4948b1=_0x5c939a;for(const _0x232c20 of _0x576928[_0x4948b1(0x19b)]())this[_0x4948b1(0x180)](_0x232c20);this[_0x4948b1(0x190)](),this[_0x4948b1(0x1a4)](_0x4948b1(0x189),{'contextItems':Array[_0x4948b1(0x171)](this[_0x4948b1(0x186)]()[_0x4948b1(0x19b)]())});}[_0x5c939a(0x17f)](){const _0x3d187e=_0x5c939a;return this[_0x3d187e(0x1b9)][_0x3d187e(0x155)](_0x3d187e(0x17a));}[_0x5c939a(0x19f)](){const _0x446b5c=_0x5c939a;return this[_0x446b5c(0x1b9)][_0x446b5c(0x155)](_0x446b5c(0x15b));}[_0x5c939a(0x16e)](){const _0x440d51=_0x5c939a;return this[_0x440d51(0x177)][_0x440d51(0x155)](_0x440d51(0x17a));}static[_0x5c939a(0x188)](_0x596b68){const _0x3d042a=_0x5c939a;return Array[_0x3d042a(0x171)](_0x596b68[_0x3d042a(0x19b)]())[_0x3d042a(0x1bc)](_0x5379b4=>this[_0x3d042a(0x145)](_0x5379b4))[_0x3d042a(0x187)](_0x1a3ef0=>null!==_0x1a3ef0);}async[_0x5c939a(0x185)](_0x10cd8a,_0x3c9d89,_0x71626=_0x30e74c[_0x5c939a(0x1c0)]){const _0x46ad8c=_0x5c939a,_0x560ef3=_0x46ad8c(0x157)+_0x38225f();this[_0x46ad8c(0x175)](_0x560ef3);try{await Promise[_0x46ad8c(0x1c5)](_0x10cd8a[_0x46ad8c(0x1bc)](async _0x3d0fea=>{const _0x127381=_0x46ad8c,_0x18754=_0x127381(0x151)+_0x38225f(),_0x55be6d=_0x21133f(_0x3d0fea[_0x127381(0x149)]);try{this[_0x127381(0x18f)]({'type':_0x71626,'label':_0x3c9d89?.[_0x127381(0x1d1)]||_0x55be6d,'uiId':_0x18754,'resourceId':_0x3c9d89?.[_0x127381(0x161)]},!0x0);const _0x3a9269=this[_0x127381(0x1a5)][_0x127381(0x1b5)](this[_0x127381(0x1b3)],_0x3d0fea,_0x3c9d89);this[_0x127381(0x17c)][_0x127381(0x1ae)](_0x18754,_0x3a9269[_0x127381(0x1af)]);const {id:_0x362392}=await _0x3a9269[_0x127381(0x1a9)]();this[_0x127381(0x17c)][_0x127381(0x152)](_0x18754),this[_0x127381(0x16b)]({'type':_0x71626,'id':_0x362392,'label':_0x3c9d89?.[_0x127381(0x1d1)]||_0x55be6d,'uiId':_0x18754,'resourceId':_0x3c9d89?.[_0x127381(0x161)]},!0x1);}catch(_0x1e9632){this[_0x127381(0x17c)][_0x127381(0x152)](_0x18754);if(!_0x1e9632[_0x127381(0x163)][_0x127381(0x167)](_0x127381(0x14d))){const _0x1452c8=new _0x2d54ee(_0x127381(0x194),null,{'fileName':_0x55be6d});_0x1452c8[_0x127381(0x17e)]=_0x1e9632[_0x127381(0x17e)],this[_0x127381(0x1a4)](_0x127381(0x17d),{'error':_0x1452c8,'fileName':_0x55be6d});}this[_0x127381(0x16d)](_0x18754);}}));}finally{this[_0x46ad8c(0x1b6)](_0x560ef3);}}[_0x5c939a(0x1c7)](_0x12bc87){const _0x50166b=_0x5c939a;if(this[_0x50166b(0x17f)]())return;const _0x30b9d8={'type':_0x30e74c[_0x50166b(0x1bd)],'uiId':_0x50166b(0x17a),'label':_0x12bc87,'isReadOnly':this[_0x50166b(0x177)][_0x50166b(0x155)](_0x50166b(0x17a)),'hidden':this[_0x50166b(0x177)][_0x50166b(0x155)](_0x50166b(0x17a))};this[_0x50166b(0x18f)](_0x30b9d8);}async[_0x5c939a(0x18d)](_0x52dbf7,_0x4bb8a7,_0x236a34,_0xf0dd05){const _0x57300c=_0x5c939a,_0x4b648d=this[_0x57300c(0x1b9)][_0x57300c(0x154)](_0x57300c(0x17a));if(_0x4b648d&&_0x52dbf7){_0x4b648d[_0x57300c(0x15b)]=_0xf0dd05?_0xf0dd05[_0x57300c(0x1bc)](_0x3dff65=>({'start':_0x3dff65[_0x57300c(0x1aa)],'end':_0x3dff65[_0x57300c(0x1c9)]})):[];try{if(_0x4b648d[_0x57300c(0x14f)]===_0x4bb8a7)return;const {id:_0x491e53}=await this[_0x57300c(0x1a5)][_0x57300c(0x14e)](this[_0x57300c(0x1b3)],_0x52dbf7,{'version':_0x4bb8a7,'sessionId':_0x236a34})[_0x57300c(0x1a9)]();_0x4b648d['id']=_0x491e53,_0x4b648d[_0x57300c(0x184)]=_0x52dbf7,_0x4b648d[_0x57300c(0x14f)]=_0x4bb8a7,_0x4b648d[_0x57300c(0x1d2)]=_0x236a34;}catch(_0x7ee88e){const _0x36af7c=new _0x2d54ee(_0x57300c(0x1b4),null);_0x36af7c[_0x57300c(0x17e)]=_0x7ee88e[_0x57300c(0x17e)],this[_0x57300c(0x1a4)](_0x57300c(0x17d),{'error':_0x36af7c});}}}[_0x5c939a(0x1b8)](_0x114aed){const _0x31ac6c=_0x5c939a;this[_0x31ac6c(0x18f)]({'type':_0x30e74c[_0x31ac6c(0x18b)],'label':_0x114aed,'uiId':_0x31ac6c(0x15b),'content':_0x114aed});}[_0x5c939a(0x160)](){const _0x340d42=_0x5c939a;this[_0x340d42(0x16d)](_0x340d42(0x15b));}async[_0x5c939a(0x18a)](_0x244a15,_0x12ceaa){const _0x2951ce=_0x5c939a,_0x1cc16c=_0x2951ce(0x199)+_0x38225f();this[_0x2951ce(0x175)](_0x1cc16c);const _0x8bb0c=_0x2951ce(0x199)+_0x38225f();try{this[_0x2951ce(0x18f)]({'type':_0x30e74c[_0x2951ce(0x196)],'label':_0x12ceaa?.[_0x2951ce(0x1d1)]||_0x244a15,'uiId':_0x8bb0c,'resourceId':_0x12ceaa?.[_0x2951ce(0x161)]},!0x0);const _0x13af3d=this[_0x2951ce(0x1a5)][_0x2951ce(0x192)](this[_0x2951ce(0x1b3)],_0x244a15,_0x12ceaa);this[_0x2951ce(0x17c)][_0x2951ce(0x1ae)](_0x8bb0c,_0x13af3d[_0x2951ce(0x1af)]);const {id:_0x3fecce}=await _0x13af3d[_0x2951ce(0x1a9)]();this[_0x2951ce(0x17c)][_0x2951ce(0x152)](_0x8bb0c),this[_0x2951ce(0x16b)]({'type':_0x30e74c[_0x2951ce(0x196)],'id':_0x3fecce,'label':_0x12ceaa?.[_0x2951ce(0x1d1)]||_0x244a15,'uiId':_0x8bb0c,'resourceId':_0x12ceaa?.[_0x2951ce(0x161)]},!0x1);}catch(_0x125400){this[_0x2951ce(0x17c)][_0x2951ce(0x152)](_0x8bb0c),(_0x125400[_0x2951ce(0x163)][_0x2951ce(0x167)](_0x2951ce(0x14d))||this[_0x2951ce(0x1a4)](_0x2951ce(0x17d),{'error':new _0x2d54ee(_0x2951ce(0x1a0),this,{'url':_0x244a15,'originalError':_0x125400}),'url':_0x244a15}),this[_0x2951ce(0x16d)](_0x8bb0c));}finally{this[_0x2951ce(0x1b6)](_0x1cc16c);}}async[_0x5c939a(0x16a)](_0x197fe6,_0x5c0ed1,_0x40ebc7){const _0x5378a8=_0x5c939a,_0x20a7ad=this[_0x5378a8(0x16c)][_0x5378a8(0x15d)][_0x5378a8(0x1ac)](_0x5de7e5=>_0x5de7e5['id']===_0x197fe6);if(!_0x20a7ad)return this[_0x5378a8(0x1a4)](_0x5378a8(0x17d),{'error':new _0x2d54ee(_0x5378a8(0x1ca),this,{'sourceId':_0x197fe6}),'sourceId':_0x197fe6}),[];try{const _0x36e99c=(await _0x20a7ad[_0x5378a8(0x15e)](_0x5c0ed1))[_0x5378a8(0x1bc)](_0x4cff60=>{const _0x46b1e8=_0x5378a8,_0x1386e3=this[_0x46b1e8(0x18e)](_0x4cff60['id']);return{..._0x4cff60,'isInContext':_0x1386e3};});return _0x20a7ad[_0x5378a8(0x1c2)]=_0x36e99c,this[_0x5378a8(0x1a4)](_0x5378a8(0x183),{'sourceId':_0x197fe6,'source':_0x20a7ad,'resources':_0x36e99c,'uid':_0x40ebc7}),_0x36e99c;}catch(_0x4d4d9c){return this[_0x5378a8(0x1a4)](_0x5378a8(0x17d),{'error':new _0x2d54ee(_0x5378a8(0x168),this,{'sourceId':_0x197fe6,'originalError':_0x4d4d9c}),'sourceId':_0x197fe6,'sourceLabel':_0x20a7ad[_0x5378a8(0x1d1)]}),[];}}async[_0x5c939a(0x1be)](_0x110856,_0x1f97c4){const _0xdd5b64=_0x5c939a;if(this[_0xdd5b64(0x18e)](_0x1f97c4['id']))return;let _0x3b7e09=_0x1f97c4[_0xdd5b64(0x1d0)];if(!_0x3b7e09&&_0x110856[_0xdd5b64(0x15c)])try{_0x3b7e09=await _0x110856[_0xdd5b64(0x15c)](_0x1f97c4['id']);}catch(_0xd55493){return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1ce),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'originalError':_0xd55493}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});}if(_0x3b7e09)switch(_0x1f97c4[_0xdd5b64(0x156)]){case _0x30e74c[_0xdd5b64(0x196)]:if(_0xdd5b64(0x165)!=typeof _0x3b7e09)return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1c8),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'expectedType':_0xdd5b64(0x165),'actualType':typeof _0x3b7e09}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});await this[_0xdd5b64(0x18a)](_0x3b7e09,{'label':_0x1f97c4[_0xdd5b64(0x1d1)],'resourceId':_0x1f97c4['id']});break;case _0x30e74c[_0xdd5b64(0x1c0)]:if(!(_0x3b7e09 instanceof File))return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1c8),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'expectedType':_0xdd5b64(0x197),'actualType':typeof _0x3b7e09}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});await this[_0xdd5b64(0x185)]([_0x3b7e09],{'label':_0x1f97c4[_0xdd5b64(0x1d1)],'resourceId':_0x1f97c4['id']});break;case _0x30e74c[_0xdd5b64(0x1c1)]:if(_0xdd5b64(0x1b1)!=typeof _0x3b7e09||!(_0xdd5b64(0x184)in _0x3b7e09)||!(_0xdd5b64(0x156)in _0x3b7e09))return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1c8),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'expectedType':_0xdd5b64(0x148),'actualType':typeof _0x3b7e09}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});_0x3b7e09=AIChatContext[_0xdd5b64(0x14a)](_0x3b7e09,_0x1f97c4[_0xdd5b64(0x1d1)]),await this[_0xdd5b64(0x185)]([_0x3b7e09],{'label':_0x1f97c4[_0xdd5b64(0x1d1)],'resourceId':_0x1f97c4['id']},_0x30e74c[_0xdd5b64(0x1c1)]);break;default:this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x15a),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'resourceType':_0x1f97c4[_0xdd5b64(0x156)]}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});}else this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x158),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});}static[_0x5c939a(0x14a)](_0x2f0dfb,_0x46b9c0){const _0x43d92a=_0x5c939a;switch(_0x2f0dfb[_0x43d92a(0x156)]){case _0x51d6ab[_0x43d92a(0x1bf)]:return new File([_0x2f0dfb[_0x43d92a(0x184)]],_0x46b9c0,{'type':_0x43d92a(0x14b)});case _0x51d6ab[_0x43d92a(0x1cf)]:return new File([_0x2f0dfb[_0x43d92a(0x184)]],_0x46b9c0,{'type':_0x43d92a(0x181)});default:return new File([_0x2f0dfb[_0x43d92a(0x184)]],_0x46b9c0,{'type':_0x43d92a(0x17b)});}}static[_0x5c939a(0x145)](_0x4c0531){const _0x4b2ae2=_0x5c939a;switch(_0x4c0531[_0x4b2ae2(0x156)]){case _0x30e74c[_0x4b2ae2(0x1c0)]:return{'type':_0x30e74c[_0x4b2ae2(0x1c0)],'id':_0x4c0531['id']};case _0x30e74c[_0x4b2ae2(0x196)]:return{'type':_0x30e74c[_0x4b2ae2(0x196)],'id':_0x4c0531['id']};case _0x30e74c[_0x4b2ae2(0x1bd)]:return{'type':_0x30e74c[_0x4b2ae2(0x1bd)],'id':_0x4c0531['id'],..._0x4c0531[_0x4b2ae2(0x15b)]?.[_0x4b2ae2(0x18c)]&&{'selection':_0x4c0531[_0x4b2ae2(0x15b)]}};case _0x30e74c[_0x4b2ae2(0x1c1)]:return{'type':_0x30e74c[_0x4b2ae2(0x1c0)],'id':_0x4c0531['id']};default:return null;}}[_0x5c939a(0x18f)](_0x2fecb7,_0x1d2490=!0x1){const _0x272b4e=_0x5c939a;if(this[_0x272b4e(0x1b9)][_0x272b4e(0x1ae)](_0x2fecb7[_0x272b4e(0x150)],_0x2fecb7),_0x2fecb7[_0x272b4e(0x1cd)]||this[_0x272b4e(0x1a4)](_0x272b4e(0x19c),{'contextItem':_0x2fecb7,'isLoading':_0x1d2490}),_0x272b4e(0x17a)===_0x2fecb7[_0x272b4e(0x150)]&&this[_0x272b4e(0x164)](),_0x2fecb7[_0x272b4e(0x161)]){const _0x24c549=this[_0x272b4e(0x193)](_0x2fecb7[_0x272b4e(0x161)]);_0x24c549&&_0x24c549[_0x272b4e(0x19e)](_0x236876=>{const _0x4a7980=_0x272b4e;this[_0x4a7980(0x1a1)](_0x236876,_0x2fecb7[_0x4a7980(0x161)],!0x0);});}}[_0x5c939a(0x16d)](_0x2b9ede){const _0x3c65db=_0x5c939a,_0x17186b=this[_0x3c65db(0x1b9)][_0x3c65db(0x154)](_0x2b9ede),_0x25d27c=this[_0x3c65db(0x17c)][_0x3c65db(0x154)](_0x2b9ede);if(_0x25d27c&&(_0x25d27c[_0x3c65db(0x174)](),this[_0x3c65db(0x17c)][_0x3c65db(0x152)](_0x2b9ede)),_0x17186b?.[_0x3c65db(0x161)]){const _0xc3d84c=this[_0x3c65db(0x193)](_0x17186b[_0x3c65db(0x161)]);_0xc3d84c&&_0xc3d84c[_0x3c65db(0x19e)](_0x53abce=>{const _0x5b14fa=_0x3c65db;this[_0x5b14fa(0x1a1)](_0x53abce,_0x17186b[_0x5b14fa(0x161)],!0x1);});}this[_0x3c65db(0x1b9)][_0x3c65db(0x152)](_0x2b9ede),this[_0x3c65db(0x1a4)](_0x3c65db(0x1b0),{'uiId':_0x2b9ede,'type':_0x17186b?.[_0x3c65db(0x156)]}),_0x3c65db(0x17a)===_0x2b9ede&&this[_0x3c65db(0x164)]();}[_0x5c939a(0x16b)](_0xcdf430,_0x54de16){const _0x5d08dd=_0x5c939a;if(this[_0x5d08dd(0x1b9)][_0x5d08dd(0x155)](_0xcdf430[_0x5d08dd(0x150)])&&(this[_0x5d08dd(0x1b9)][_0x5d08dd(0x1ae)](_0xcdf430[_0x5d08dd(0x150)],_0xcdf430),this[_0x5d08dd(0x1a4)](_0x5d08dd(0x1a6),{'contextItem':_0xcdf430,'isLoading':_0x54de16}),_0xcdf430[_0x5d08dd(0x161)])){const _0x11f597=this[_0x5d08dd(0x193)](_0xcdf430[_0x5d08dd(0x161)]);_0x11f597&&_0x11f597[_0x5d08dd(0x19e)](_0x4bd807=>{const _0x18e0c0=_0x5d08dd;this[_0x18e0c0(0x1a1)](_0x4bd807,_0xcdf430[_0x18e0c0(0x161)],!0x0);});}}[_0x5c939a(0x180)](_0x3f027e){const _0x204aad=_0x5c939a;this[_0x204aad(0x177)][_0x204aad(0x1ae)](_0x3f027e[_0x204aad(0x150)],_0x3f027e);}[_0x5c939a(0x1ab)](){const _0x52c068=_0x5c939a;this[_0x52c068(0x16c)]={'document':{'enabled':!0x1!==this[_0x52c068(0x173)]?.[_0x52c068(0x19d)]?.[_0x52c068(0x153)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x52c068(0x173)]?.[_0x52c068(0x1b2)]?.[_0x52c068(0x153)]},'files':{'enabled':!0x1!==this[_0x52c068(0x173)]?.[_0x52c068(0x14c)]?.[_0x52c068(0x153)]},'sources':this[_0x52c068(0x1a2)]()},this[_0x52c068(0x1a4)](_0x52c068(0x1c3),{'options':this[_0x52c068(0x16c)]});}[_0x5c939a(0x1a2)](){const _0x54246a=_0x5c939a;return this[_0x54246a(0x173)]?.[_0x54246a(0x15d)]?.[_0x54246a(0x1bc)](_0x3173bd=>({..._0x3173bd,'resources':[]}))??[];}[_0x5c939a(0x164)](){const _0x4377f4=_0x5c939a,_0x5d2664=this[_0x4377f4(0x17f)]()||this[_0x4377f4(0x16e)]();this[_0x4377f4(0x16c)][_0x4377f4(0x19d)][_0x4377f4(0x170)]=_0x5d2664,this[_0x4377f4(0x1a4)](_0x4377f4(0x1c3),{'options':this[_0x4377f4(0x16c)]});}[_0x5c939a(0x18e)](_0x230b59){const _0x3376b6=_0x5c939a;for(const _0x67e407 of this[_0x3376b6(0x1b9)][_0x3376b6(0x19b)]())if(_0x67e407[_0x3376b6(0x161)]===_0x230b59)return!0x0;for(const _0x4a482d of this[_0x3376b6(0x177)][_0x3376b6(0x19b)]())if(_0x4a482d[_0x3376b6(0x161)]===_0x230b59)return!0x0;return!0x1;}[_0x5c939a(0x193)](_0x590acc){const _0x1b7158=_0x5c939a,_0x25a388=[];for(const _0x28230a of this[_0x1b7158(0x16c)][_0x1b7158(0x15d)]){_0x28230a[_0x1b7158(0x1c2)][_0x1b7158(0x1ac)](_0x54f688=>_0x54f688['id']===_0x590acc)&&_0x25a388[_0x1b7158(0x1c6)](_0x28230a['id']);}return 0x0===_0x25a388[_0x1b7158(0x18c)]?null:_0x25a388;}[_0x5c939a(0x1a1)](_0x165908,_0x56cc8c,_0x35a743){const _0x1decc5=_0x5c939a,_0x63066e=this[_0x1decc5(0x16c)][_0x1decc5(0x15d)][_0x1decc5(0x1ac)](_0x35e5dc=>_0x35e5dc['id']===_0x165908);if(!_0x63066e)return;const _0x423f03=_0x63066e[_0x1decc5(0x1c2)][_0x1decc5(0x1ac)](_0x132ea7=>_0x132ea7['id']===_0x56cc8c);_0x423f03&&(_0x423f03[_0x1decc5(0x1ad)]=_0x35a743,this[_0x1decc5(0x1a4)](_0x1decc5(0x16f),{'sourceId':_0x165908,'resourceId':_0x56cc8c,'isInContext':_0x35a743}));}[_0x5c939a(0x175)](_0x21507c){const _0xe84a3b=_0x5c939a;this[_0xe84a3b(0x1bb)][_0xe84a3b(0x1ae)](_0x21507c,!0x0),this[_0xe84a3b(0x1bb)][_0xe84a3b(0x179)]&&this[_0xe84a3b(0x1a4)](_0xe84a3b(0x147),{'isUploadInProgress':!0x0});}[_0x5c939a(0x1b6)](_0x552444){const _0x650d63=_0x5c939a;this[_0x650d63(0x1bb)][_0x650d63(0x152)](_0x552444),0x0===this[_0x650d63(0x1bb)][_0x650d63(0x179)]&&this[_0x650d63(0x1a4)](_0x650d63(0x147),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
const _0xf1cea4=_0x8c08;function _0x391d(){const _0x264333=['_addToConversationContextItem','sources','uploadDocument','_startUploadOperation','160BqpgiX','file-','481747KipQbF','url-','clearPendingContextItems','ai-request-aborted','_isResourceInContext','getSentContextItems','abort','string','type','document','_finishContextItemLoading','values','set','updateCurrentDocument','object','Current\x20document','_ongoingUploads','File','resourceStateChanged','getPendingContextItems','420MowMpg','fetchDocument','find','url','ai-chat-document-upload-failed','has','getData','contextItemRemoved','isReadOnly','removeSelectionFromContext','version','154DkbyYW','text/markdown','SELECTION','isSelectionInContext','end','attributes','abortController','addToConversationContext','HTML','_finishUploadOperation','uploadFile','getResources','612048FDBWxY','1762LDKgRv','populateFromMessage','filter','text/html','URL','_mapContextItemToRequestData','all','_ongoingUploadOperations','urls','_addContextOptionsState','8fJEEfI','ai-chat-resource-load-failed','FILE','ai-chat-url-upload-failed','ai-chat-source-not-found','_findSourceIdsByResourceId','_connector','ai-chat-source-resources-load-failed','length','contextItemLoadingEnded','addFilesToContext','object\x20with\x20content\x20and\x20type\x20properties','push','getId','uploadUrl','_setAddContextOptionsDefaultState','_convertTextResourceToFile','addUrlToContext','uiId','136953NQIKeR','forEach','enabled','files','_config','isHidden','isInContext','_updateResourceInContextState','data','init','_removeContextItem','get','_ownerId','resourceId','getDocument','sourceResourcesLoaded','current-document','addResourceToContext','message','TEXT','size','label','contextSent','fire','stack','from','ai-chat-context-unsupported-type','_getCustomSourcesInitialState','removeFromContext','addContextOptionsChanged','contextItemAdded','454112tGrqwz','addSelectionToContext','content','MARKDOWN','ai-chat-file-upload-failed','start','isCurrentDocumentInContext','selection','uploadProgressChanged','_createContextItemFromContent','DOCUMENT','ai-chat-resource-no-data','addCurrentDocumentToContext','527706AxvZbt','delete','text/plain','mapContextItemsToRequestData','3545tRLZMt','_toggleAddCurrentDocumentOptionVisibility','files-','_pendingContextItems','2084FqzQUT','name','isCurrentDocumentInConversation','map','_conversationContextItems','error','resources','sessionId','startsWith','hidden','ai-chat-context-invalid-data','_addContextItem','loadSourceResources'];_0x391d=function(){return _0x264333;};return _0x391d();}(function(_0x19582e,_0x41e6ab){const _0x3208a4=_0x8c08,_0x5780a9=_0x19582e();while(!![]){try{const _0x3a7a7d=-parseInt(_0x3208a4(0xd6))/0x1+-parseInt(_0x3208a4(0x9a))/0x2*(-parseInt(_0x3208a4(0x112))/0x3)+-parseInt(_0x3208a4(0xeb))/0x4*(parseInt(_0x3208a4(0xe7))/0x5)+parseInt(_0x3208a4(0xe3))/0x6+parseInt(_0x3208a4(0xfe))/0x7*(parseInt(_0x3208a4(0xa4))/0x8)+-parseInt(_0x3208a4(0xb7))/0x9*(-parseInt(_0x3208a4(0xfc))/0xa)+-parseInt(_0x3208a4(0x8d))/0xb*(-parseInt(_0x3208a4(0x99))/0xc);if(_0x3a7a7d===_0x41e6ab)break;else _0x5780a9['push'](_0x5780a9['shift']());}catch(_0x388b56){_0x5780a9['push'](_0x5780a9['shift']());}}}(_0x391d,0x651bb));import{CKEditorError as _0x253b2f,ObservableMixin as _0x11f21a,uid as _0x1e8a68}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x5c271b,AIContextTextResourceType as _0x3ea9f8}from'../../aicore/model/aicontext.js';import{escape as _0x2348be}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xf1cea4(0xd5),_0xf1cea4(0x89),_0xf1cea4(0xad),_0xf1cea4(0xcd),_0xf1cea4(0xf0),_0xf1cea4(0xd4),_0xf1cea4(0xc6),_0xf1cea4(0x110),_0xf1cea4(0xde)];function _0x8c08(_0xd658d3,_0x2d6a68){const _0x391d5a=_0x391d();return _0x8c08=function(_0x8c089,_0x4a523a){_0x8c089=_0x8c089-0x87;let _0x19ec72=_0x391d5a[_0x8c089];return _0x19ec72;},_0x8c08(_0xd658d3,_0x2d6a68);}export class AIChatContext extends _0x11f21a(){[_0xf1cea4(0xaa)];[_0xf1cea4(0xbb)];[_0xf1cea4(0xc3)];constructor({connector:_0x568fc4,config:_0x462133,ownerId:_0x13c3af}){const _0x1218e2=_0xf1cea4;super(),this[_0x1218e2(0xaa)]=_0x568fc4,this[_0x1218e2(0xbb)]=_0x462133,this[_0x1218e2(0xc3)]=_0x13c3af;}[_0xf1cea4(0xc0)](){const _0x4f4d2e=_0xf1cea4;this[_0x4f4d2e(0xea)]=new Map(),this[_0x4f4d2e(0xef)]=new Map(),this[_0x4f4d2e(0x10e)]=new Map(),this[_0x4f4d2e(0xa1)]=new Map(),this[_0x4f4d2e(0xb3)]();}[_0xf1cea4(0x111)](){const _0x1a2c69=_0xf1cea4;return this[_0x1a2c69(0xea)];}async[_0xf1cea4(0x9b)](_0x25d527){const _0x2a6ca4=_0xf1cea4,_0x4dca58=await this[_0x2a6ca4(0xdf)](_0x25d527);return this[_0x2a6ca4(0xf8)](_0x4dca58),_0x2a6ca4(0xc7)===_0x4dca58[_0x2a6ca4(0xb6)]&&this[_0x2a6ca4(0xe8)](),_0x4dca58;}async[_0xf1cea4(0xdf)](_0x3de4e7){const _0x5c70b8=_0xf1cea4;if(_0x3de4e7[_0x5c70b8(0x106)]===_0x5c271b[_0x5c70b8(0xe0)]){const _0x1fd5f8=await this[_0x5c70b8(0xaa)][_0x5c70b8(0x113)](this[_0x5c70b8(0xc3)],_0x3de4e7['id'])[_0x5c70b8(0xc5)]();return{'id':_0x5c70b8(0xc7),'uiId':_0x5c70b8(0xc7),'label':_0x5c70b8(0x10d),'type':_0x3de4e7[_0x5c70b8(0x106)],'content':_0x1fd5f8[_0x5c70b8(0xd8)],'hidden':this[_0x5c70b8(0xef)][_0x5c70b8(0x87)](_0x5c70b8(0xc7)),'version':_0x1fd5f8[_0x5c70b8(0x92)]?.[_0x5c70b8(0x8c)],'sessionId':_0x1fd5f8[_0x5c70b8(0x92)]?.[_0x5c70b8(0xf2)]};}return{'id':_0x3de4e7['id'],'uiId':_0x3de4e7['id'],'label':_0x3de4e7[_0x5c70b8(0x92)]?.[_0x5c70b8(0xcc)]||_0x3de4e7[_0x5c70b8(0xec)]||_0x3de4e7[_0x5c70b8(0x115)]||_0x3de4e7['id'],'type':_0x3de4e7[_0x5c70b8(0x106)],..._0x3de4e7?.[_0x5c70b8(0x92)]?.[_0x5c70b8(0xc4)]?{'resourceId':_0x3de4e7[_0x5c70b8(0x92)]?.[_0x5c70b8(0xc4)]}:{}};}[_0xf1cea4(0x103)](){const _0x188325=_0xf1cea4;return new Map(this[_0x188325(0xef)]);}[_0xf1cea4(0xd3)](_0x2cbf9f){const _0x34c44c=_0xf1cea4,_0x4ad2e5=this[_0x34c44c(0xea)][_0x34c44c(0xc2)](_0x2cbf9f);_0x4ad2e5?.[_0x34c44c(0x8a)]||this[_0x34c44c(0xc1)](_0x2cbf9f);}[_0xf1cea4(0x100)](){const _0x95ebb7=_0xf1cea4;if(0x0===this[_0x95ebb7(0xea)][_0x95ebb7(0xcb)])return;for(const _0x55be0d of this[_0x95ebb7(0xea)][_0x95ebb7(0x109)]())this[_0x95ebb7(0xc1)](_0x55be0d[_0x95ebb7(0xb6)]);const _0x1c0919=this[_0x95ebb7(0xef)][_0x95ebb7(0xc2)](_0x95ebb7(0xc7))||this[_0x95ebb7(0xea)][_0x95ebb7(0xc2)](_0x95ebb7(0xc7));_0x1c0919&&this[_0x95ebb7(0xf6)]({..._0x1c0919,'isReadOnly':!0x0,'hidden':!0x0});}[_0xf1cea4(0x94)](_0xa892e7){const _0x2bc3f5=_0xf1cea4;for(const _0x13d14f of _0xa892e7[_0x2bc3f5(0x109)]())this[_0x2bc3f5(0xf8)](_0x13d14f);this[_0x2bc3f5(0x100)](),this[_0x2bc3f5(0xce)](_0x2bc3f5(0xcd),{'contextItems':Array[_0x2bc3f5(0xd0)](this[_0x2bc3f5(0x103)]()[_0x2bc3f5(0x109)]())});}[_0xf1cea4(0xdc)](){const _0x25fb38=_0xf1cea4;return this[_0x25fb38(0xea)][_0x25fb38(0x87)](_0x25fb38(0xc7));}[_0xf1cea4(0x90)](){const _0x410729=_0xf1cea4;return this[_0x410729(0xea)][_0x410729(0x87)](_0x410729(0xdd));}[_0xf1cea4(0xed)](){const _0xce811a=_0xf1cea4;return this[_0xce811a(0xef)][_0xce811a(0x87)](_0xce811a(0xc7));}static[_0xf1cea4(0xe6)](_0x3a1062){const _0x8dc65=_0xf1cea4;return Array[_0x8dc65(0xd0)](_0x3a1062[_0x8dc65(0x109)]())[_0x8dc65(0xee)](_0x16a6b6=>this[_0x8dc65(0x9f)](_0x16a6b6))[_0x8dc65(0x9c)](_0x6c5eac=>null!==_0x6c5eac);}async[_0xf1cea4(0xae)](_0x24e545,_0x2d990b,_0x41a541=_0x5c271b[_0xf1cea4(0xa6)]){const _0xf612e1=_0xf1cea4,_0x3609c5=_0xf612e1(0xe9)+_0x1e8a68();this[_0xf612e1(0xfb)](_0x3609c5);try{await Promise[_0xf612e1(0xa0)](_0x24e545[_0xf612e1(0xee)](async _0x4db0a1=>{const _0x538e41=_0xf612e1,_0x3499c1=_0x538e41(0xfd)+_0x1e8a68(),_0x1c9a37=_0x2348be(_0x4db0a1[_0x538e41(0xec)]);try{this[_0x538e41(0xf6)]({'type':_0x41a541,'label':_0x2d990b?.[_0x538e41(0xcc)]||_0x1c9a37,'uiId':_0x3499c1,'resourceId':_0x2d990b?.[_0x538e41(0xc4)]},!0x0);const _0xfcc24a=this[_0x538e41(0xaa)][_0x538e41(0x97)](this[_0x538e41(0xc3)],_0x4db0a1,_0x2d990b);this[_0x538e41(0x10e)][_0x538e41(0x10a)](_0x3499c1,_0xfcc24a[_0x538e41(0x93)]);const {id:_0x1196c1}=await _0xfcc24a[_0x538e41(0xb1)]();this[_0x538e41(0x10e)][_0x538e41(0xe4)](_0x3499c1),this[_0x538e41(0x108)]({'type':_0x41a541,'id':_0x1196c1,'label':_0x2d990b?.[_0x538e41(0xcc)]||_0x1c9a37,'uiId':_0x3499c1,'resourceId':_0x2d990b?.[_0x538e41(0xc4)]},!0x1);}catch(_0x18b8b1){this[_0x538e41(0x10e)][_0x538e41(0xe4)](_0x3499c1);if(!_0x18b8b1[_0x538e41(0xc9)][_0x538e41(0xf3)](_0x538e41(0x101))){const _0xd6f4de=new _0x253b2f(_0x538e41(0xda),null,{'fileName':_0x1c9a37});_0xd6f4de[_0x538e41(0xcf)]=_0x18b8b1[_0x538e41(0xcf)],this[_0x538e41(0xce)](_0x538e41(0xf0),{'error':_0xd6f4de,'fileName':_0x1c9a37});}this[_0x538e41(0xc1)](_0x3499c1);}}));}finally{this[_0xf612e1(0x96)](_0x3609c5);}}[_0xf1cea4(0xe2)](_0x19ff4c){const _0x374aa6=_0xf1cea4;if(this[_0x374aa6(0xdc)]())return;const _0x2d68ee={'type':_0x5c271b[_0x374aa6(0xe0)],'uiId':_0x374aa6(0xc7),'label':_0x19ff4c,'isReadOnly':this[_0x374aa6(0xef)][_0x374aa6(0x87)](_0x374aa6(0xc7)),'hidden':this[_0x374aa6(0xef)][_0x374aa6(0x87)](_0x374aa6(0xc7))};this[_0x374aa6(0xf6)](_0x2d68ee);}async[_0xf1cea4(0x10b)](_0x23e0c3,_0x2a2883,_0x507b27,_0x1e4831){const _0x2b2d48=_0xf1cea4,_0x2ba4e8=this[_0x2b2d48(0xea)][_0x2b2d48(0xc2)](_0x2b2d48(0xc7));if(_0x2ba4e8&&_0x23e0c3){_0x2ba4e8[_0x2b2d48(0xdd)]=_0x1e4831?_0x1e4831[_0x2b2d48(0xee)](_0x54d0b4=>({'start':_0x54d0b4[_0x2b2d48(0xdb)],'end':_0x54d0b4[_0x2b2d48(0x91)]})):[];try{if(_0x2ba4e8[_0x2b2d48(0x8c)]===_0x2a2883)return;const {id:_0x2e3017}=await this[_0x2b2d48(0xaa)][_0x2b2d48(0xfa)](this[_0x2b2d48(0xc3)],_0x23e0c3,{'version':_0x2a2883,'sessionId':_0x507b27})[_0x2b2d48(0xb1)]();_0x2ba4e8['id']=_0x2e3017,_0x2ba4e8[_0x2b2d48(0xd8)]=_0x23e0c3,_0x2ba4e8[_0x2b2d48(0x8c)]=_0x2a2883,_0x2ba4e8[_0x2b2d48(0xf2)]=_0x507b27;}catch(_0x27fb58){const _0x32fe7b=new _0x253b2f(_0x2b2d48(0x116),null);_0x32fe7b[_0x2b2d48(0xcf)]=_0x27fb58[_0x2b2d48(0xcf)],this[_0x2b2d48(0xce)](_0x2b2d48(0xf0),{'error':_0x32fe7b});}}}[_0xf1cea4(0xd7)](_0x4878f1){const _0x125525=_0xf1cea4;this[_0x125525(0xf6)]({'type':_0x5c271b[_0x125525(0x8f)],'label':_0x4878f1,'uiId':_0x125525(0xdd),'content':_0x4878f1});}[_0xf1cea4(0x8b)](){const _0x6b4e53=_0xf1cea4;this[_0x6b4e53(0xc1)](_0x6b4e53(0xdd));}async[_0xf1cea4(0xb5)](_0x1d35ff,_0x9ba5ac){const _0x426d97=_0xf1cea4,_0x596676=_0x426d97(0xff)+_0x1e8a68();this[_0x426d97(0xfb)](_0x596676);const _0x5d010d=_0x426d97(0xff)+_0x1e8a68();try{this[_0x426d97(0xf6)]({'type':_0x5c271b[_0x426d97(0x9e)],'label':_0x9ba5ac?.[_0x426d97(0xcc)]||_0x1d35ff,'uiId':_0x5d010d,'resourceId':_0x9ba5ac?.[_0x426d97(0xc4)]},!0x0);const _0x15402a=this[_0x426d97(0xaa)][_0x426d97(0xb2)](this[_0x426d97(0xc3)],_0x1d35ff,_0x9ba5ac);this[_0x426d97(0x10e)][_0x426d97(0x10a)](_0x5d010d,_0x15402a[_0x426d97(0x93)]);const {id:_0x490f3d}=await _0x15402a[_0x426d97(0xb1)]();this[_0x426d97(0x10e)][_0x426d97(0xe4)](_0x5d010d),this[_0x426d97(0x108)]({'type':_0x5c271b[_0x426d97(0x9e)],'id':_0x490f3d,'label':_0x9ba5ac?.[_0x426d97(0xcc)]||_0x1d35ff,'uiId':_0x5d010d,'resourceId':_0x9ba5ac?.[_0x426d97(0xc4)]},!0x1);}catch(_0x2f833e){this[_0x426d97(0x10e)][_0x426d97(0xe4)](_0x5d010d),(_0x2f833e[_0x426d97(0xc9)][_0x426d97(0xf3)](_0x426d97(0x101))||this[_0x426d97(0xce)](_0x426d97(0xf0),{'error':new _0x253b2f(_0x426d97(0xa7),this,{'url':_0x1d35ff,'originalError':_0x2f833e}),'url':_0x1d35ff}),this[_0x426d97(0xc1)](_0x5d010d));}finally{this[_0x426d97(0x96)](_0x596676);}}async[_0xf1cea4(0xf7)](_0x297e28,_0x9e4ee2,_0x3b9ac6){const _0x3feba8=_0xf1cea4,_0x1e76fb=this[_0x3feba8(0xa3)][_0x3feba8(0xf9)][_0x3feba8(0x114)](_0x7e094d=>_0x7e094d['id']===_0x297e28);if(!_0x1e76fb)return this[_0x3feba8(0xce)](_0x3feba8(0xf0),{'error':new _0x253b2f(_0x3feba8(0xa8),this,{'sourceId':_0x297e28}),'sourceId':_0x297e28}),[];try{const _0x102458=(await _0x1e76fb[_0x3feba8(0x98)](_0x9e4ee2))[_0x3feba8(0xee)](_0x42d35c=>{const _0x4a7b92=_0x3feba8,_0x2a7f48=this[_0x4a7b92(0x102)](_0x42d35c['id']);return{..._0x42d35c,'isInContext':_0x2a7f48};});return _0x1e76fb[_0x3feba8(0xf1)]=_0x102458,this[_0x3feba8(0xce)](_0x3feba8(0xc6),{'sourceId':_0x297e28,'source':_0x1e76fb,'resources':_0x102458,'uid':_0x3b9ac6}),_0x102458;}catch(_0x1d332a){return this[_0x3feba8(0xce)](_0x3feba8(0xf0),{'error':new _0x253b2f(_0x3feba8(0xab),this,{'sourceId':_0x297e28,'originalError':_0x1d332a}),'sourceId':_0x297e28,'sourceLabel':_0x1e76fb[_0x3feba8(0xcc)]}),[];}}async[_0xf1cea4(0xc8)](_0x263e13,_0x26c0d9){const _0x507d61=_0xf1cea4;if(this[_0x507d61(0x102)](_0x26c0d9['id']))return;let _0x2d1701=_0x26c0d9[_0x507d61(0xbf)];if(!_0x2d1701&&_0x263e13[_0x507d61(0x88)])try{_0x2d1701=await _0x263e13[_0x507d61(0x88)](_0x26c0d9['id']);}catch(_0xe18cfa){return void this[_0x507d61(0xce)](_0x507d61(0xf0),{'error':new _0x253b2f(_0x507d61(0xa5),this,{'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id'],'originalError':_0xe18cfa}),'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']});}if(_0x2d1701)switch(_0x26c0d9[_0x507d61(0x106)]){case _0x5c271b[_0x507d61(0x9e)]:if(_0x507d61(0x105)!=typeof _0x2d1701)return void this[_0x507d61(0xce)](_0x507d61(0xf0),{'error':new _0x253b2f(_0x507d61(0xf5),this,{'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id'],'expectedType':_0x507d61(0x105),'actualType':typeof _0x2d1701}),'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']});await this[_0x507d61(0xb5)](_0x2d1701,{'label':_0x26c0d9[_0x507d61(0xcc)],'resourceId':_0x26c0d9['id']});break;case _0x5c271b[_0x507d61(0xa6)]:if(!(_0x2d1701 instanceof File))return void this[_0x507d61(0xce)](_0x507d61(0xf0),{'error':new _0x253b2f(_0x507d61(0xf5),this,{'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id'],'expectedType':_0x507d61(0x10f),'actualType':typeof _0x2d1701}),'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']});await this[_0x507d61(0xae)]([_0x2d1701],{'label':_0x26c0d9[_0x507d61(0xcc)],'resourceId':_0x26c0d9['id']});break;case _0x5c271b[_0x507d61(0xca)]:if(_0x507d61(0x10c)!=typeof _0x2d1701||!(_0x507d61(0xd8)in _0x2d1701)||!(_0x507d61(0x106)in _0x2d1701))return void this[_0x507d61(0xce)](_0x507d61(0xf0),{'error':new _0x253b2f(_0x507d61(0xf5),this,{'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id'],'expectedType':_0x507d61(0xaf),'actualType':typeof _0x2d1701}),'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']});_0x2d1701=AIChatContext[_0x507d61(0xb4)](_0x2d1701,_0x26c0d9[_0x507d61(0xcc)]),await this[_0x507d61(0xae)]([_0x2d1701],{'label':_0x26c0d9[_0x507d61(0xcc)],'resourceId':_0x26c0d9['id']},_0x5c271b[_0x507d61(0xca)]);break;default:this[_0x507d61(0xce)](_0x507d61(0xf0),{'error':new _0x253b2f(_0x507d61(0xd1),this,{'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id'],'resourceType':_0x26c0d9[_0x507d61(0x106)]}),'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']});}else this[_0x507d61(0xce)](_0x507d61(0xf0),{'error':new _0x253b2f(_0x507d61(0xe1),this,{'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']}),'resourceId':_0x26c0d9['id'],'sourceId':_0x263e13['id']});}static[_0xf1cea4(0xb4)](_0x2852a6,_0x49d31a){const _0x46dfaf=_0xf1cea4;switch(_0x2852a6[_0x46dfaf(0x106)]){case _0x3ea9f8[_0x46dfaf(0xd9)]:return new File([_0x2852a6[_0x46dfaf(0xd8)]],_0x49d31a,{'type':_0x46dfaf(0x8e)});case _0x3ea9f8[_0x46dfaf(0x95)]:return new File([_0x2852a6[_0x46dfaf(0xd8)]],_0x49d31a,{'type':_0x46dfaf(0x9d)});default:return new File([_0x2852a6[_0x46dfaf(0xd8)]],_0x49d31a,{'type':_0x46dfaf(0xe5)});}}static[_0xf1cea4(0x9f)](_0x57cf10){const _0x744deb=_0xf1cea4;switch(_0x57cf10[_0x744deb(0x106)]){case _0x5c271b[_0x744deb(0xa6)]:return{'type':_0x5c271b[_0x744deb(0xa6)],'id':_0x57cf10['id']};case _0x5c271b[_0x744deb(0x9e)]:return{'type':_0x5c271b[_0x744deb(0x9e)],'id':_0x57cf10['id']};case _0x5c271b[_0x744deb(0xe0)]:return{'type':_0x5c271b[_0x744deb(0xe0)],'id':_0x57cf10['id'],..._0x57cf10[_0x744deb(0xdd)]?.[_0x744deb(0xac)]&&{'selection':_0x57cf10[_0x744deb(0xdd)]}};case _0x5c271b[_0x744deb(0xca)]:return{'type':_0x5c271b[_0x744deb(0xa6)],'id':_0x57cf10['id']};default:return null;}}[_0xf1cea4(0xf6)](_0x454276,_0x1ebfbd=!0x1){const _0x44a990=_0xf1cea4;if(this[_0x44a990(0xea)][_0x44a990(0x10a)](_0x454276[_0x44a990(0xb6)],_0x454276),_0x454276[_0x44a990(0xf4)]||this[_0x44a990(0xce)](_0x44a990(0xd5),{'contextItem':_0x454276,'isLoading':_0x1ebfbd}),_0x44a990(0xc7)===_0x454276[_0x44a990(0xb6)]&&this[_0x44a990(0xe8)](),_0x454276[_0x44a990(0xc4)]){const _0x46bb87=this[_0x44a990(0xa9)](_0x454276[_0x44a990(0xc4)]);_0x46bb87&&_0x46bb87[_0x44a990(0xb8)](_0x17c9a5=>{const _0xcb3974=_0x44a990;this[_0xcb3974(0xbe)](_0x17c9a5,_0x454276[_0xcb3974(0xc4)],!0x0);});}}[_0xf1cea4(0xc1)](_0x37dc3c){const _0xe26fcf=_0xf1cea4,_0x59152d=this[_0xe26fcf(0xea)][_0xe26fcf(0xc2)](_0x37dc3c),_0x2d210c=this[_0xe26fcf(0x10e)][_0xe26fcf(0xc2)](_0x37dc3c);if(_0x2d210c&&(_0x2d210c[_0xe26fcf(0x104)](),this[_0xe26fcf(0x10e)][_0xe26fcf(0xe4)](_0x37dc3c)),_0x59152d?.[_0xe26fcf(0xc4)]){const _0x237aff=this[_0xe26fcf(0xa9)](_0x59152d[_0xe26fcf(0xc4)]);_0x237aff&&_0x237aff[_0xe26fcf(0xb8)](_0x24acaa=>{const _0x1b4d75=_0xe26fcf;this[_0x1b4d75(0xbe)](_0x24acaa,_0x59152d[_0x1b4d75(0xc4)],!0x1);});}this[_0xe26fcf(0xea)][_0xe26fcf(0xe4)](_0x37dc3c),this[_0xe26fcf(0xce)](_0xe26fcf(0x89),{'uiId':_0x37dc3c,'type':_0x59152d?.[_0xe26fcf(0x106)]}),_0xe26fcf(0xc7)===_0x37dc3c&&this[_0xe26fcf(0xe8)]();}[_0xf1cea4(0x108)](_0x24f58d,_0x55efbf){const _0xde28db=_0xf1cea4;if(this[_0xde28db(0xea)][_0xde28db(0x87)](_0x24f58d[_0xde28db(0xb6)])&&(this[_0xde28db(0xea)][_0xde28db(0x10a)](_0x24f58d[_0xde28db(0xb6)],_0x24f58d),this[_0xde28db(0xce)](_0xde28db(0xad),{'contextItem':_0x24f58d,'isLoading':_0x55efbf}),_0x24f58d[_0xde28db(0xc4)])){const _0xb80605=this[_0xde28db(0xa9)](_0x24f58d[_0xde28db(0xc4)]);_0xb80605&&_0xb80605[_0xde28db(0xb8)](_0x34839d=>{const _0x418968=_0xde28db;this[_0x418968(0xbe)](_0x34839d,_0x24f58d[_0x418968(0xc4)],!0x0);});}}[_0xf1cea4(0xf8)](_0x211f2f){const _0x3a1231=_0xf1cea4;this[_0x3a1231(0xef)][_0x3a1231(0x10a)](_0x211f2f[_0x3a1231(0xb6)],_0x211f2f);}[_0xf1cea4(0xb3)](){const _0x1cfe25=_0xf1cea4;this[_0x1cfe25(0xa3)]={'document':{'enabled':!0x1!==this[_0x1cfe25(0xbb)]?.[_0x1cfe25(0x107)]?.[_0x1cfe25(0xb9)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x1cfe25(0xbb)]?.[_0x1cfe25(0xa2)]?.[_0x1cfe25(0xb9)]},'files':{'enabled':!0x1!==this[_0x1cfe25(0xbb)]?.[_0x1cfe25(0xba)]?.[_0x1cfe25(0xb9)]},'sources':this[_0x1cfe25(0xd2)]()},this[_0x1cfe25(0xce)](_0x1cfe25(0xd4),{'options':this[_0x1cfe25(0xa3)]});}[_0xf1cea4(0xd2)](){const _0xbf290f=_0xf1cea4;return this[_0xbf290f(0xbb)]?.[_0xbf290f(0xf9)]?.[_0xbf290f(0xee)](_0x13b3d9=>({..._0x13b3d9,'resources':[]}))??[];}[_0xf1cea4(0xe8)](){const _0x42f9a0=_0xf1cea4,_0x5bca29=this[_0x42f9a0(0xdc)]()||this[_0x42f9a0(0xed)]();this[_0x42f9a0(0xa3)][_0x42f9a0(0x107)][_0x42f9a0(0xbc)]=_0x5bca29,this[_0x42f9a0(0xce)](_0x42f9a0(0xd4),{'options':this[_0x42f9a0(0xa3)]});}[_0xf1cea4(0x102)](_0x3958ff){const _0x5bff54=_0xf1cea4;for(const _0xfe5a73 of this[_0x5bff54(0xea)][_0x5bff54(0x109)]())if(_0xfe5a73[_0x5bff54(0xc4)]===_0x3958ff)return!0x0;for(const _0x1c6e52 of this[_0x5bff54(0xef)][_0x5bff54(0x109)]())if(_0x1c6e52[_0x5bff54(0xc4)]===_0x3958ff)return!0x0;return!0x1;}[_0xf1cea4(0xa9)](_0x48c081){const _0xdaf701=_0xf1cea4,_0x12af7c=[];for(const _0x4e1df of this[_0xdaf701(0xa3)][_0xdaf701(0xf9)]){_0x4e1df[_0xdaf701(0xf1)][_0xdaf701(0x114)](_0xb7d9f=>_0xb7d9f['id']===_0x48c081)&&_0x12af7c[_0xdaf701(0xb0)](_0x4e1df['id']);}return 0x0===_0x12af7c[_0xdaf701(0xac)]?null:_0x12af7c;}[_0xf1cea4(0xbe)](_0x2e8583,_0x6a22dd,_0x2428e1){const _0x47368f=_0xf1cea4,_0x26f1e1=this[_0x47368f(0xa3)][_0x47368f(0xf9)][_0x47368f(0x114)](_0x48df8a=>_0x48df8a['id']===_0x2e8583);if(!_0x26f1e1)return;const _0x7f8281=_0x26f1e1[_0x47368f(0xf1)][_0x47368f(0x114)](_0x3c3142=>_0x3c3142['id']===_0x6a22dd);_0x7f8281&&(_0x7f8281[_0x47368f(0xbd)]=_0x2428e1,this[_0x47368f(0xce)](_0x47368f(0x110),{'sourceId':_0x2e8583,'resourceId':_0x6a22dd,'isInContext':_0x2428e1}));}[_0xf1cea4(0xfb)](_0x222ca5){const _0x504db7=_0xf1cea4;this[_0x504db7(0xa1)][_0x504db7(0x10a)](_0x222ca5,!0x0),this[_0x504db7(0xa1)][_0x504db7(0xcb)]&&this[_0x504db7(0xce)](_0x504db7(0xde),{'isUploadInProgress':!0x0});}[_0xf1cea4(0x96)](_0x44c490){const _0x2218cc=_0xf1cea4;this[_0x2218cc(0xa1)][_0x2218cc(0xe4)](_0x44c490),0x0===this[_0x2218cc(0xa1)][_0x2218cc(0xcb)]&&this[_0x2218cc(0xce)](_0x2218cc(0xde),{'isUploadInProgress':!0x1});}}
|
|
@@ -16,9 +16,7 @@ import { AIChatInteraction } from './aichatinteraction.js';
|
|
|
16
16
|
import { type AIQuickActionRequestData } from '../../aiquickactions/aiquickactions.js';
|
|
17
17
|
declare const AIChatConversation_base: {
|
|
18
18
|
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
19
|
-
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
20
|
-
* The current interaction in the conversation. Set and unset by {@link #handleUserInteraction}.
|
|
21
|
-
*/
|
|
19
|
+
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
22
20
|
};
|
|
23
21
|
/**
|
|
24
22
|
* Represents a conversation between the user and the AI endpoint on top of the
|
|
@@ -265,6 +263,6 @@ export type AIChatConversationOptions = {
|
|
|
265
263
|
getEditor?: () => Editor;
|
|
266
264
|
conversationId: string;
|
|
267
265
|
group: string;
|
|
268
|
-
|
|
266
|
+
selectedModelId?: string;
|
|
269
267
|
};
|
|
270
268
|
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x55c61c=_0x38d4;(function(_0x336f32,_0x304558){const _0x15a0e6=_0x38d4,_0x3ad43e=_0x336f32();while(!![]){try{const _0x4c8fd8=-parseInt(_0x15a0e6(0x109))/0x1+-parseInt(_0x15a0e6(0xf3))/0x2+-parseInt(_0x15a0e6(0x13a))/0x3*(-parseInt(_0x15a0e6(0x102))/0x4)+-parseInt(_0x15a0e6(0x152))/0x5+parseInt(_0x15a0e6(0x161))/0x6*(parseInt(_0x15a0e6(0x138))/0x7)+-parseInt(_0x15a0e6(0xff))/0x8*(parseInt(_0x15a0e6(0x13f))/0x9)+-parseInt(_0x15a0e6(0x154))/0xa*(-parseInt(_0x15a0e6(0x11a))/0xb);if(_0x4c8fd8===_0x304558)break;else _0x3ad43e['push'](_0x3ad43e['shift']());}catch(_0x4cc1ab){_0x3ad43e['push'](_0x3ad43e['shift']());}}}(_0x7fe2,0x5343b));import{CKEditorError as _0x4aff0e,EmitterMixin as _0x4a8474}from'ckeditor5/src/utils.js';function _0x7fe2(){const _0xa2008e=['defaultModelId','ai-chat-conversation-set-model-null','isStarted','addSelectionToContext','start','fire','fetchConversation','model','toLowerCase','ai-chat-conversation-init-from-id-failed','attributes','1881435RoqszN','hasOwn','12652330BlZyZN','ai-chat-conversation-set-model-not-available','text-delta','push','updateCurrentDocumentInContext','webSearch','getDefault','assistant','ai-chat-handle-user-conversation-not-initialized','loadSourceResources','chatContext','addFilesToContext','createReply','1755060GVILVc','indexOf','getMessages','removeSelectionFromContext','text','988030OAhBgv','removeInteraction','ai-chat-conversation-start-failed','contextItems','selectedModel','modification-delta','isSelectionInContext','getInteraction','currentInteraction','stop','addCurrentDocumentToContext','_extractContextItems','8KDnvVp','user','currentReply','8fezBIE','error','ai-chat-conversation-init-failed','handleUserInteraction','type','isAvailable','modelSelected','596889dQyyfo','quickActionData','startConversation','group','load','find','splice','createInteraction','conversationId','connector','addResourceToContext','content','isCurrentDocumentInContext','message','fetchConversationMessages','init','setModel','11atwMxD','length','options','getAll','updateCurrentDocument','title','sessionId','stack','getCurrentDocumentContext','addUrlToContext','toggleReasoning','getDocumentContext','removeFromContext','_processMessagesToInteractions','getEditor','ai-chat-conversation-start-no-model-selected','interactions','toggleWebSearch','reset','addToConversationContext','lastInteraction','interactionCreated','setConversationTitle','conversationStarted','appendContent','chatCapabilities','isCurrentDocumentInConversation','delegate','capabilities','getConversation','14pSxVdT','destroy','900006kcBbnt','prompt','getCapabilitiesConfig','reasoning','chatModels','5778135MNIzue','conversationInitialized','set','ai-chat-conversation-already-started','ai-chat-handle-user-interaction-already-in-progress','populateFromMessage','getPendingContextItems','role'];_0x7fe2=function(){return _0xa2008e;};return _0x7fe2();}import{AI_MODEL_EVENT_NAMES as _0x42a1b0}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x276658,AI_CONTEXT_MODEL_EVENT_NAMES as _0x437e02}from'./aichatcontext.js';import{AICapabilities as _0x38c3d8,CAPABILITIES_MODEL_EVENT_NAMES as _0x3c7664}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x22984b}from'./aichatinteraction.js';function _0x38d4(_0x208a92,_0x57cef7){const _0x7fe273=_0x7fe2();return _0x38d4=function(_0x38d455,_0xbae5d8){_0x38d455=_0x38d455-0xef;let _0x143024=_0x7fe273[_0x38d455];return _0x143024;},_0x38d4(_0x208a92,_0x57cef7);}export class AIChatConversation extends _0x4a8474(){['id'];[_0x55c61c(0x149)]=!0x1;[_0x55c61c(0x12a)]=[];[_0x55c61c(0xfb)];[_0x55c61c(0xf7)];[_0x55c61c(0x112)];[_0x55c61c(0x11c)];constructor(_0x307a52){const _0x41e876=_0x55c61c;super(),this[_0x41e876(0x11c)]=_0x307a52,this[_0x41e876(0x112)]=_0x307a52[_0x41e876(0x112)],this[_0x41e876(0x13e)]=_0x307a52[_0x41e876(0x13e)],this['id']=_0x307a52[_0x41e876(0x111)];}async[_0x55c61c(0x118)](_0x1851c5){const _0x48e799=_0x55c61c;try{this[_0x48e799(0x15e)]=new _0x276658({'connector':this[_0x48e799(0x112)],'config':_0x1851c5,'ownerId':this['id']}),this[_0x48e799(0x15e)][_0x48e799(0x135)](..._0x437e02)['to'](this),this[_0x48e799(0x15e)][_0x48e799(0x118)](),this[_0x48e799(0x133)]=new _0x38c3d8(),this[_0x48e799(0x133)][_0x48e799(0x135)](..._0x3c7664)['to'](this),this[_0x48e799(0x133)][_0x48e799(0x118)]();const _0x49b529=await this[_0x48e799(0x13e)][_0x48e799(0x11d)]();this[_0x48e799(0x14c)](_0x48e799(0x140),{'availableModels':_0x49b529});const _0x1402d1=await this[_0x48e799(0x13e)][_0x48e799(0x15a)](this[_0x48e799(0x11c)][_0x48e799(0x147)]);_0x1402d1&&await this[_0x48e799(0x119)](_0x1402d1);}catch(_0x33c97c){const _0x2bdcf8=new _0x4aff0e(_0x48e799(0x104),null,{'message':_0x33c97c[_0x48e799(0x116)]});_0x2bdcf8[_0x48e799(0x121)]=_0x33c97c[_0x48e799(0x121)],this[_0x48e799(0x14c)](_0x48e799(0x103),{'error':_0x2bdcf8});}}async[_0x55c61c(0x14b)](){const _0xdbdd54=_0x55c61c;if(this[_0xdbdd54(0x149)])throw new _0x4aff0e(_0xdbdd54(0x142),null,{'conversation':this});if(!this[_0xdbdd54(0xf7)])throw new _0x4aff0e(_0xdbdd54(0x129),null,{'conversation':this});try{const {id:_0x44f055}=await this[_0xdbdd54(0x112)][_0xdbdd54(0x10b)](this['id'],this[_0xdbdd54(0x11c)][_0xdbdd54(0x10c)])[_0xdbdd54(0x137)]();this['id']=_0x44f055,this[_0xdbdd54(0x149)]=!0x0,this[_0xdbdd54(0x14c)](_0xdbdd54(0x131),{'conversationId':this['id'],'selectedModel':this[_0xdbdd54(0xf7)]});}catch(_0x1f8df0){const _0x5112d3=new _0x4aff0e(_0xdbdd54(0xf5),null,{'message':_0x1f8df0[_0xdbdd54(0x116)]});_0x5112d3[_0xdbdd54(0x121)]=_0x1f8df0[_0xdbdd54(0x121)],this[_0xdbdd54(0x14c)](_0xdbdd54(0x103),{'error':_0x5112d3});}}async[_0x55c61c(0x10d)](_0x4adb70,_0x5709cd){const _0x416f1e=_0x55c61c;try{const _0x23a9d8=await this[_0x416f1e(0x112)][_0x416f1e(0x14d)](_0x4adb70)[_0x416f1e(0x137)](),_0x283815=await this[_0x416f1e(0x112)][_0x416f1e(0x117)](_0x4adb70)[_0x416f1e(0xf0)](),_0x4e0bc9=_0x283815[0x0][_0x416f1e(0x14e)];this[_0x416f1e(0x149)]=!0x0,this['id']=_0x23a9d8['id'],_0x416f1e(0x11f)in _0x23a9d8?this[_0x416f1e(0x14c)](_0x416f1e(0x130),_0x23a9d8[_0x416f1e(0x11f)],!0x0):this[_0x416f1e(0x14c)](_0x416f1e(0x130),'',!0x0);const _0x1b6163=(await this[_0x416f1e(0x13e)][_0x416f1e(0x11d)]())[_0x416f1e(0x10e)](_0x51604d=>_0x51604d['id'][_0x416f1e(0x14f)]()===_0x4e0bc9[_0x416f1e(0x14f)]());return this[_0x416f1e(0xf7)]=_0x1b6163,this[_0x416f1e(0x14c)](_0x416f1e(0x108),{'selectedModel':_0x1b6163,'isDisabled':!0x0}),await this[_0x416f1e(0x127)](_0x283815,_0x5709cd,_0x4e0bc9),this[_0x416f1e(0xfb)]=void 0x0,this;}catch(_0x898404){const _0x1b7276=new _0x4aff0e(_0x416f1e(0x150),null,{'message':_0x898404[_0x416f1e(0x116)],'conversationId':_0x4adb70});throw _0x1b7276[_0x416f1e(0x121)]=_0x898404[_0x416f1e(0x121)],this[_0x416f1e(0x14c)](_0x416f1e(0x103),{'error':_0x1b7276}),_0x1b7276;}}async[_0x55c61c(0x127)](_0x277442,_0x4fa7c,_0x585cdd){const _0x54357d=_0x55c61c;let _0x49cbd9;for(const _0x4d8b87 of _0x277442)if(_0x54357d(0x100)===_0x4d8b87[_0x54357d(0x146)]){const _0x6e45e4=await this[_0x54357d(0xfe)](_0x4d8b87),_0x5bcfc8={'isReasoningEnabled':Object[_0x54357d(0x153)](_0x4d8b87[_0x54357d(0x136)],_0x54357d(0x13d)),'isWebSearchEnabled':Object[_0x54357d(0x153)](_0x4d8b87[_0x54357d(0x136)],_0x54357d(0x159))};_0x49cbd9=this[_0x54357d(0x110)]({'userMessage':_0x4d8b87[_0x54357d(0x13b)],'contextItems':_0x6e45e4,'capabilities':_0x5bcfc8,'modelId':_0x585cdd,'quickActionData':_0x4d8b87[_0x54357d(0x151)]?.[_0x54357d(0x10a)]}),this[_0x54357d(0xfb)]=_0x49cbd9,this[_0x54357d(0x15e)][_0x54357d(0x12d)](this[_0x54357d(0xfb)][_0x54357d(0xf6)]);}else{if(_0x54357d(0x15b)===_0x4d8b87[_0x54357d(0x146)]&&_0x49cbd9)for(const _0x28f2bf of _0x4d8b87[_0x54357d(0x114)]){const _0x21d10e=_0x54357d(0xf2)===_0x28f2bf[_0x54357d(0x106)]?_0x54357d(0x156):_0x54357d(0xf8),_0x21f9be=_0x49cbd9[_0x54357d(0x125)]()?.[_0x54357d(0x120)]!==_0x4fa7c;_0x49cbd9[_0x54357d(0x101)]=_0x49cbd9[_0x54357d(0x160)]({'type':_0x21d10e,'isDone':!0x0,'interactionId':_0x49cbd9['id'],'areActionsDisabled':_0x21f9be}),_0x49cbd9[_0x54357d(0x101)][_0x54357d(0x132)](_0x28f2bf[_0x54357d(0x114)]);}}}async[_0x55c61c(0xfe)](_0x54cdb3){const _0x238d32=_0x55c61c,_0x2e6e6c=new Map();if(!_0x54cdb3[_0x238d32(0x114)])return _0x2e6e6c;for(const _0x487003 of _0x54cdb3[_0x238d32(0x114)]){const _0x2c7508=await this[_0x238d32(0x15e)][_0x238d32(0x144)](_0x487003);_0x2c7508&&_0x2e6e6c[_0x238d32(0x141)](_0x2c7508['id'],_0x2c7508);}return _0x2e6e6c;}async[_0x55c61c(0x105)]({userMessage:_0x8c4217,quickActionData:_0xe95160}){const _0x123d19=_0x55c61c;if(!this[_0x123d19(0x149)])throw new _0x4aff0e(_0x123d19(0x15c),null,{'conversation':this});if(this[_0x123d19(0xfb)])throw new _0x4aff0e(_0x123d19(0x143),null,{'conversation':this});try{const _0x11a840=this[_0x123d19(0x15e)][_0x123d19(0x145)](),_0x2c1edd=this[_0x123d19(0x133)][_0x123d19(0x13c)](),_0x1106a3=this[_0x123d19(0xf7)]['id'];this[_0x123d19(0xfb)]=this[_0x123d19(0x110)]({'userMessage':_0x8c4217,'contextItems':_0x11a840,'capabilities':_0x2c1edd,'modelId':_0x1106a3,'quickActionData':_0xe95160}),await this[_0x123d19(0xfb)][_0x123d19(0x14b)](),this[_0x123d19(0x15e)][_0x123d19(0x12d)](this[_0x123d19(0xfb)][_0x123d19(0xf6)]);}catch(_0x4235a5){this[_0x123d19(0x14c)](_0x123d19(0x103),{'interactionId':this[_0x123d19(0xfb)]?this[_0x123d19(0xfb)]['id']:void 0x0,'error':_0x4235a5});}finally{this[_0x123d19(0xfb)]?.[_0x123d19(0xfc)](),this[_0x123d19(0xfb)]=void 0x0;}}[_0x55c61c(0x110)]({userMessage:_0x537f28,contextItems:_0x2e9285,capabilities:_0x4a6444,modelId:_0x2df662,quickActionData:_0x26d366}){const _0x239dc8=_0x55c61c,_0x27aab5=new _0x22984b({'userMessage':_0x537f28,'contextItems':_0x2e9285,'capabilities':_0x4a6444,'conversationId':this['id'],'connector':this[_0x239dc8(0x112)],'editor':this[_0x239dc8(0x11c)][_0x239dc8(0x128)]&&this[_0x239dc8(0x11c)][_0x239dc8(0x128)](),'model':_0x2df662,'quickActionData':_0x26d366});return _0x27aab5[_0x239dc8(0x135)](..._0x42a1b0)['to'](this),this[_0x239dc8(0x12a)][_0x239dc8(0x157)](_0x27aab5),this[_0x239dc8(0x14c)](_0x239dc8(0x12f),_0x27aab5),_0x27aab5;}[_0x55c61c(0xfa)](_0x462926){const _0x1ff899=_0x55c61c;return this[_0x1ff899(0x12a)][_0x1ff899(0x10e)](_0xf12988=>_0xf12988['id']===_0x462926);}[_0x55c61c(0xf4)](_0x23b5b2){const _0x234d23=_0x55c61c,_0x53728b=this[_0x234d23(0xfa)](_0x23b5b2);_0x53728b&&(_0x53728b[_0x234d23(0x139)](),this[_0x234d23(0x12a)][_0x234d23(0x10f)](this[_0x234d23(0x12a)][_0x234d23(0xef)](_0x53728b),0x1));}get[_0x55c61c(0x12e)](){const _0x47de3e=_0x55c61c;return this[_0x47de3e(0x12a)][this[_0x47de3e(0x12a)][_0x47de3e(0x11b)]-0x1];}[_0x55c61c(0xfd)](_0x5538de){const _0x28ff8c=_0x55c61c;this[_0x28ff8c(0x15e)][_0x28ff8c(0xfd)](_0x5538de);}async[_0x55c61c(0x158)]({content:_0x3d961b,version:_0x473250,sessionId:_0xe3b6bb,selections:_0x38ff11}){const _0xba7448=_0x55c61c;await this[_0xba7448(0x15e)][_0xba7448(0x11e)](_0x3d961b,_0x473250,_0xe3b6bb,_0x38ff11);}[_0x55c61c(0x122)](){const _0x176d11=_0x55c61c;return this[_0x176d11(0xfb)]?.[_0x176d11(0x125)]()?.[_0x176d11(0x114)]||'';}[_0x55c61c(0x14a)](_0x28dfba){const _0x36fa24=_0x55c61c;this[_0x36fa24(0x15e)][_0x36fa24(0x14a)](_0x28dfba);}[_0x55c61c(0xf1)](){const _0x3dcf8a=_0x55c61c;this[_0x3dcf8a(0x15e)][_0x3dcf8a(0xf1)]();}[_0x55c61c(0x15f)](_0x5c005d){const _0x2d6246=_0x55c61c;this[_0x2d6246(0x15e)][_0x2d6246(0x15f)](_0x5c005d);}[_0x55c61c(0x123)](_0x5e2c20){const _0x1adda6=_0x55c61c;this[_0x1adda6(0x15e)][_0x1adda6(0x123)](_0x5e2c20);}[_0x55c61c(0x113)](_0x5e2221,_0xa7b2c9){const _0x2ffb79=_0x55c61c;this[_0x2ffb79(0x15e)][_0x2ffb79(0x113)](_0x5e2221,_0xa7b2c9);}[_0x55c61c(0x15d)](_0x1b4f18,_0x2c1666,_0x384c20){const _0x4ea41e=_0x55c61c;return this[_0x4ea41e(0x15e)][_0x4ea41e(0x15d)](_0x1b4f18,_0x2c1666,_0x384c20);}[_0x55c61c(0x126)](_0x3dad0c){const _0x49ca81=_0x55c61c;this[_0x49ca81(0x15e)][_0x49ca81(0x126)](_0x3dad0c);}[_0x55c61c(0x12b)](){const _0x317cfa=_0x55c61c;this[_0x317cfa(0x133)][_0x317cfa(0x12b)]();}[_0x55c61c(0x124)](){const _0x39d79f=_0x55c61c;this[_0x39d79f(0x133)][_0x39d79f(0x124)]();}[_0x55c61c(0x115)](){const _0x57f621=_0x55c61c;return this[_0x57f621(0x15e)][_0x57f621(0x115)]();}[_0x55c61c(0x134)](){const _0x1be9e2=_0x55c61c;return this[_0x1be9e2(0x15e)][_0x1be9e2(0x134)]();}[_0x55c61c(0xf9)](){const _0x89e80b=_0x55c61c;return this[_0x89e80b(0x15e)][_0x89e80b(0xf9)]();}async[_0x55c61c(0x119)](_0x389faf){const _0x36f11f=_0x55c61c;if(!_0x389faf)throw new _0x4aff0e(_0x36f11f(0x148),null,{'conversation':this});if(!0x1===await this[_0x36f11f(0x13e)][_0x36f11f(0x107)](_0x389faf))throw new _0x4aff0e(_0x36f11f(0x155),null,{'conversation':this,'model':_0x389faf});_0x389faf['id']!==this[_0x36f11f(0xf7)]?.['id']&&(this[_0x36f11f(0xf7)]=_0x389faf,this[_0x36f11f(0x133)][_0x36f11f(0x12c)](),this[_0x36f11f(0x14c)](_0x36f11f(0x108),{'selectedModel':_0x389faf}));}}
|
|
23
|
+
const _0x1b4b4f=_0x5dd1;(function(_0xe2f9ec,_0x379fe9){const _0xbf6501=_0x5dd1,_0xba2bec=_0xe2f9ec();while(!![]){try{const _0x3b1b8e=-parseInt(_0xbf6501(0x24d))/0x1*(-parseInt(_0xbf6501(0x24b))/0x2)+-parseInt(_0xbf6501(0x22f))/0x3*(parseInt(_0xbf6501(0x203))/0x4)+parseInt(_0xbf6501(0x1ec))/0x5+-parseInt(_0xbf6501(0x22e))/0x6*(parseInt(_0xbf6501(0x209))/0x7)+parseInt(_0xbf6501(0x23f))/0x8+-parseInt(_0xbf6501(0x1e8))/0x9*(-parseInt(_0xbf6501(0x200))/0xa)+-parseInt(_0xbf6501(0x207))/0xb;if(_0x3b1b8e===_0x379fe9)break;else _0xba2bec['push'](_0xba2bec['shift']());}catch(_0x1bf39a){_0xba2bec['push'](_0xba2bec['shift']());}}}(_0x39c0,0x5948e));function _0x39c0(){const _0x462d3c=['model','length','18wRZShY','conversationId','getModel','reset','3007495bXTVeH','addSelectionToContext','user','addUrlToContext','toggleReasoning','fetchConversation','ai-chat-conversation-init-failed','text-delta','chatContext','getAll','isStarted','sessionId','lastInteraction','updateCurrentDocument','removeFromContext','isAvailable','handleUserInteraction','ai-chat-conversation-init-from-id-failed','load','interactions','2959930NtBatZ','hasOwn','getEditor','4VQNQqX','chatModels','contextItems','getCurrentDocumentContext','13350403XqqAMZ','updateCurrentDocumentInContext','148939BNzUYK','stop','addResourceToContext','chatCapabilities','webSearch','message','indexOf','error','isCurrentDocumentInConversation','createReply','toLowerCase','addToConversationContext','assistant','prompt','addCurrentDocumentToContext','getConversation','getMessages','options','ai-chat-conversation-set-model-null','conversationInitialized','_processMessagesToInteractions','delegate','quickActionData','ai-chat-conversation-already-started','init','title','_extractContextItems','content','modelSelected','getCapabilitiesConfig','getInteraction','connector','set','group','startConversation','attributes','capabilities','78sYIACE','343470tGiRtk','find','ai-chat-conversation-set-model-not-available','createInteraction','ai-chat-conversation-start-failed','currentReply','appendContent','interactionCreated','toggleWebSearch','currentInteraction','getDocumentContext','populateFromMessage','destroy','splice','push','getAvailableModels','1350664StzzdW','type','stack','removeInteraction','getPendingContextItems','start','ai-chat-conversation-start-no-model-selected','ai-chat-handle-user-interaction-already-in-progress','reasoning','selectedModelId','ai-chat-handle-user-conversation-not-initialized','conversationStarted','1216312VueJTJ','modification-delta','1JMPNre','selectedModel','role','removeSelectionFromContext','setModel','setConversationTitle','isSelectionInContext','isCurrentDocumentInContext','fire','addFilesToContext','fetchConversationMessages','text','loadSourceResources'];_0x39c0=function(){return _0x462d3c;};return _0x39c0();}import{CKEditorError as _0x683b6,EmitterMixin as _0x431b0e,logWarning as _0x5d0b1c}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x1dfa8c}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x222cb9,AI_CONTEXT_MODEL_EVENT_NAMES as _0x31fa6c}from'./aichatcontext.js';import{AICapabilities as _0x34407b,CAPABILITIES_MODEL_EVENT_NAMES as _0x4f1492}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x12de79}from'./aichatinteraction.js';function _0x5dd1(_0x25f969,_0xddc0c){const _0x39c054=_0x39c0();return _0x5dd1=function(_0x5dd16b,_0x4db09d){_0x5dd16b=_0x5dd16b-0x1dd;let _0x54bc70=_0x39c054[_0x5dd16b];return _0x54bc70;},_0x5dd1(_0x25f969,_0xddc0c);}export class AIChatConversation extends _0x431b0e(){['id'];[_0x1b4b4f(0x1f6)]=!0x1;[_0x1b4b4f(0x1ff)]=[];[_0x1b4b4f(0x238)];[_0x1b4b4f(0x24e)];[_0x1b4b4f(0x228)];[_0x1b4b4f(0x21a)];constructor(_0x4c65f0){const _0x122b7a=_0x1b4b4f;super(),this[_0x122b7a(0x21a)]=_0x4c65f0,this[_0x122b7a(0x228)]=_0x4c65f0[_0x122b7a(0x228)],this[_0x122b7a(0x204)]=_0x4c65f0[_0x122b7a(0x204)],this['id']=_0x4c65f0[_0x122b7a(0x1e9)];}async[_0x1b4b4f(0x221)](_0x443660){const _0x461c68=_0x1b4b4f;try{this[_0x461c68(0x1f4)]=new _0x222cb9({'connector':this[_0x461c68(0x228)],'config':_0x443660,'ownerId':this['id']}),this[_0x461c68(0x1f4)][_0x461c68(0x21e)](..._0x31fa6c)['to'](this),this[_0x461c68(0x1f4)][_0x461c68(0x221)](),this[_0x461c68(0x20c)]=new _0x34407b(),this[_0x461c68(0x20c)][_0x461c68(0x21e)](..._0x4f1492)['to'](this),this[_0x461c68(0x20c)][_0x461c68(0x221)]();const _0x1b3705=await this[_0x461c68(0x204)][_0x461c68(0x23e)]();this[_0x461c68(0x1e1)](_0x461c68(0x21c),{'availableModels':_0x1b3705});const _0x26667f=await this[_0x461c68(0x204)][_0x461c68(0x1ea)](this[_0x461c68(0x21a)][_0x461c68(0x248)]);_0x26667f&&await this[_0x461c68(0x1dd)](_0x26667f);}catch(_0x17b44b){const _0x470c7c=new _0x683b6(_0x461c68(0x1f2),null,{'message':_0x17b44b[_0x461c68(0x20e)]});_0x470c7c[_0x461c68(0x241)]=_0x17b44b[_0x461c68(0x241)],this[_0x461c68(0x1e1)](_0x461c68(0x210),{'error':_0x470c7c});}}async[_0x1b4b4f(0x244)](){const _0x1bf59e=_0x1b4b4f;if(this[_0x1bf59e(0x1f6)])throw new _0x683b6(_0x1bf59e(0x220),null,{'conversation':this});if(!this[_0x1bf59e(0x24e)])throw new _0x683b6(_0x1bf59e(0x245),null,{'conversation':this});try{const {id:_0x504015}=await this[_0x1bf59e(0x228)][_0x1bf59e(0x22b)](this['id'],this[_0x1bf59e(0x21a)][_0x1bf59e(0x22a)])[_0x1bf59e(0x218)]();this['id']=_0x504015,this[_0x1bf59e(0x1f6)]=!0x0,this[_0x1bf59e(0x1e1)](_0x1bf59e(0x24a),{'conversationId':this['id'],'selectedModel':this[_0x1bf59e(0x24e)]});}catch(_0x10d260){const _0x13f9ec=new _0x683b6(_0x1bf59e(0x233),null,{'message':_0x10d260[_0x1bf59e(0x20e)]});_0x13f9ec[_0x1bf59e(0x241)]=_0x10d260[_0x1bf59e(0x241)],this[_0x1bf59e(0x1e1)](_0x1bf59e(0x210),{'error':_0x13f9ec});}}async[_0x1b4b4f(0x1fe)](_0x377df9,_0x1282fa){const _0x29974b=_0x1b4b4f;try{const _0x3a335f=await this[_0x29974b(0x228)][_0x29974b(0x1f1)](_0x377df9)[_0x29974b(0x218)](),_0x5ace52=await this[_0x29974b(0x228)][_0x29974b(0x1e3)](_0x377df9)[_0x29974b(0x219)](),_0x162b8e=_0x5ace52[0x0][_0x29974b(0x1e6)];this[_0x29974b(0x1f6)]=!0x0,this['id']=_0x3a335f['id'],_0x29974b(0x222)in _0x3a335f?this[_0x29974b(0x1e1)](_0x29974b(0x1de),_0x3a335f[_0x29974b(0x222)],!0x0):this[_0x29974b(0x1e1)](_0x29974b(0x1de),'',!0x0);const _0x5a0aec=(await this[_0x29974b(0x204)][_0x29974b(0x1f5)]())[_0x29974b(0x230)](_0xe84755=>_0xe84755['id'][_0x29974b(0x213)]()===_0x162b8e[_0x29974b(0x213)]());return this[_0x29974b(0x24e)]=_0x5a0aec,this[_0x29974b(0x1e1)](_0x29974b(0x225),{'selectedModel':_0x5a0aec,'isDisabled':!0x0}),await this[_0x29974b(0x21d)](_0x5ace52,_0x1282fa,_0x162b8e),this[_0x29974b(0x238)]=void 0x0,this;}catch(_0x225857){const _0x56e002=new _0x683b6(_0x29974b(0x1fd),null,{'message':_0x225857[_0x29974b(0x20e)],'conversationId':_0x377df9});throw _0x56e002[_0x29974b(0x241)]=_0x225857[_0x29974b(0x241)],this[_0x29974b(0x1e1)](_0x29974b(0x210),{'error':_0x56e002}),_0x56e002;}}async[_0x1b4b4f(0x21d)](_0x2de61e,_0x312f5b,_0x89c078){const _0x1ad5db=_0x1b4b4f;let _0x4c26f;for(const _0x399f4f of _0x2de61e)if(_0x1ad5db(0x1ee)===_0x399f4f[_0x1ad5db(0x24f)]){const _0x154b85=await this[_0x1ad5db(0x223)](_0x399f4f),_0x1aa879={'isReasoningEnabled':Object[_0x1ad5db(0x201)](_0x399f4f[_0x1ad5db(0x22d)],_0x1ad5db(0x247)),'isWebSearchEnabled':Object[_0x1ad5db(0x201)](_0x399f4f[_0x1ad5db(0x22d)],_0x1ad5db(0x20d))};_0x4c26f=this[_0x1ad5db(0x232)]({'userMessage':_0x399f4f[_0x1ad5db(0x216)],'contextItems':_0x154b85,'capabilities':_0x1aa879,'modelId':_0x89c078,'quickActionData':_0x399f4f[_0x1ad5db(0x22c)]?.[_0x1ad5db(0x21f)]}),this[_0x1ad5db(0x238)]=_0x4c26f,this[_0x1ad5db(0x1f4)][_0x1ad5db(0x214)](this[_0x1ad5db(0x238)][_0x1ad5db(0x205)]);}else{if(_0x1ad5db(0x215)===_0x399f4f[_0x1ad5db(0x24f)]&&_0x4c26f)for(const _0x559a8d of _0x399f4f[_0x1ad5db(0x224)]){const _0x367de8=_0x1ad5db(0x1e4)===_0x559a8d[_0x1ad5db(0x240)]?_0x1ad5db(0x1f3):_0x1ad5db(0x24c),_0x30337a=_0x4c26f[_0x1ad5db(0x239)]()?.[_0x1ad5db(0x1f7)]!==_0x312f5b;_0x4c26f[_0x1ad5db(0x234)]=_0x4c26f[_0x1ad5db(0x212)]({'type':_0x367de8,'isDone':!0x0,'interactionId':_0x4c26f['id'],'areActionsDisabled':_0x30337a}),_0x4c26f[_0x1ad5db(0x234)][_0x1ad5db(0x235)](_0x559a8d[_0x1ad5db(0x224)]);}}}async[_0x1b4b4f(0x223)](_0x5e696d){const _0x11b6d2=_0x1b4b4f,_0x5c2e18=new Map();if(!_0x5e696d[_0x11b6d2(0x224)])return _0x5c2e18;for(const _0x517175 of _0x5e696d[_0x11b6d2(0x224)]){const _0xb8ae0c=await this[_0x11b6d2(0x1f4)][_0x11b6d2(0x23a)](_0x517175);_0xb8ae0c&&_0x5c2e18[_0x11b6d2(0x229)](_0xb8ae0c['id'],_0xb8ae0c);}return _0x5c2e18;}async[_0x1b4b4f(0x1fc)]({userMessage:_0x4ebd8b,quickActionData:_0x4abb01}){const _0x1d7694=_0x1b4b4f;if(!this[_0x1d7694(0x1f6)])throw new _0x683b6(_0x1d7694(0x249),null,{'conversation':this});if(this[_0x1d7694(0x238)])throw new _0x683b6(_0x1d7694(0x246),null,{'conversation':this});try{const _0xa1205e=this[_0x1d7694(0x1f4)][_0x1d7694(0x243)](),_0x4e995b=this[_0x1d7694(0x20c)][_0x1d7694(0x226)](),_0x3709c4=this[_0x1d7694(0x24e)]['id'];this[_0x1d7694(0x238)]=this[_0x1d7694(0x232)]({'userMessage':_0x4ebd8b,'contextItems':_0xa1205e,'capabilities':_0x4e995b,'modelId':_0x3709c4,'quickActionData':_0x4abb01}),await this[_0x1d7694(0x238)][_0x1d7694(0x244)](),this[_0x1d7694(0x1f4)][_0x1d7694(0x214)](this[_0x1d7694(0x238)][_0x1d7694(0x205)]);}catch(_0x21c03a){this[_0x1d7694(0x1e1)](_0x1d7694(0x210),{'interactionId':this[_0x1d7694(0x238)]?this[_0x1d7694(0x238)]['id']:void 0x0,'error':_0x21c03a});}finally{this[_0x1d7694(0x238)]?.[_0x1d7694(0x20a)](),this[_0x1d7694(0x238)]=void 0x0;}}[_0x1b4b4f(0x232)]({userMessage:_0x5ba5fd,contextItems:_0x2c6780,capabilities:_0x867adf,modelId:_0x40295b,quickActionData:_0x1ec45e}){const _0x5d644f=_0x1b4b4f,_0x437d13=new _0x12de79({'userMessage':_0x5ba5fd,'contextItems':_0x2c6780,'capabilities':_0x867adf,'conversationId':this['id'],'connector':this[_0x5d644f(0x228)],'editor':this[_0x5d644f(0x21a)][_0x5d644f(0x202)]&&this[_0x5d644f(0x21a)][_0x5d644f(0x202)](),'model':_0x40295b,'quickActionData':_0x1ec45e});return _0x437d13[_0x5d644f(0x21e)](..._0x1dfa8c)['to'](this),this[_0x5d644f(0x1ff)][_0x5d644f(0x23d)](_0x437d13),this[_0x5d644f(0x1e1)](_0x5d644f(0x236),_0x437d13),_0x437d13;}[_0x1b4b4f(0x227)](_0x105b58){const _0x593aa3=_0x1b4b4f;return this[_0x593aa3(0x1ff)][_0x593aa3(0x230)](_0xf5f57f=>_0xf5f57f['id']===_0x105b58);}[_0x1b4b4f(0x242)](_0x15909c){const _0x1edd6f=_0x1b4b4f,_0x300124=this[_0x1edd6f(0x227)](_0x15909c);_0x300124&&(_0x300124[_0x1edd6f(0x23b)](),this[_0x1edd6f(0x1ff)][_0x1edd6f(0x23c)](this[_0x1edd6f(0x1ff)][_0x1edd6f(0x20f)](_0x300124),0x1));}get[_0x1b4b4f(0x1f8)](){const _0x5a17fc=_0x1b4b4f;return this[_0x5a17fc(0x1ff)][this[_0x5a17fc(0x1ff)][_0x5a17fc(0x1e7)]-0x1];}[_0x1b4b4f(0x217)](_0x330092){const _0xd5430b=_0x1b4b4f;this[_0xd5430b(0x1f4)][_0xd5430b(0x217)](_0x330092);}async[_0x1b4b4f(0x208)]({content:_0x31d2d0,version:_0x1f40e3,sessionId:_0x1c6f26,selections:_0x16c8f7}){const _0x493926=_0x1b4b4f;await this[_0x493926(0x1f4)][_0x493926(0x1f9)](_0x31d2d0,_0x1f40e3,_0x1c6f26,_0x16c8f7);}[_0x1b4b4f(0x206)](){const _0xd0a916=_0x1b4b4f;return this[_0xd0a916(0x238)]?.[_0xd0a916(0x239)]()?.[_0xd0a916(0x224)]||'';}[_0x1b4b4f(0x1ed)](_0x59e29b){const _0x559f56=_0x1b4b4f;this[_0x559f56(0x1f4)][_0x559f56(0x1ed)](_0x59e29b);}[_0x1b4b4f(0x250)](){const _0x181025=_0x1b4b4f;this[_0x181025(0x1f4)][_0x181025(0x250)]();}[_0x1b4b4f(0x1e2)](_0x183bf6){const _0x295397=_0x1b4b4f;this[_0x295397(0x1f4)][_0x295397(0x1e2)](_0x183bf6);}[_0x1b4b4f(0x1ef)](_0x44c844){const _0x72a364=_0x1b4b4f;this[_0x72a364(0x1f4)][_0x72a364(0x1ef)](_0x44c844);}[_0x1b4b4f(0x20b)](_0x1e57d1,_0xc296f9){const _0x20d4a4=_0x1b4b4f;this[_0x20d4a4(0x1f4)][_0x20d4a4(0x20b)](_0x1e57d1,_0xc296f9);}[_0x1b4b4f(0x1e5)](_0x4720ec,_0x271f5a,_0x51d401){const _0x438213=_0x1b4b4f;return this[_0x438213(0x1f4)][_0x438213(0x1e5)](_0x4720ec,_0x271f5a,_0x51d401);}[_0x1b4b4f(0x1fa)](_0x26ec45){const _0x34d8d1=_0x1b4b4f;this[_0x34d8d1(0x1f4)][_0x34d8d1(0x1fa)](_0x26ec45);}[_0x1b4b4f(0x237)](){const _0x296102=_0x1b4b4f;this[_0x296102(0x20c)][_0x296102(0x237)]();}[_0x1b4b4f(0x1f0)](){const _0x592b02=_0x1b4b4f;this[_0x592b02(0x20c)][_0x592b02(0x1f0)]();}[_0x1b4b4f(0x1e0)](){const _0x2e53f8=_0x1b4b4f;return this[_0x2e53f8(0x1f4)][_0x2e53f8(0x1e0)]();}[_0x1b4b4f(0x211)](){const _0x18fe5d=_0x1b4b4f;return this[_0x18fe5d(0x1f4)][_0x18fe5d(0x211)]();}[_0x1b4b4f(0x1df)](){const _0x3d9edd=_0x1b4b4f;return this[_0x3d9edd(0x1f4)][_0x3d9edd(0x1df)]();}async[_0x1b4b4f(0x1dd)](_0x1c5a26){const _0x5c405a=_0x1b4b4f;_0x1c5a26?!0x1===await this[_0x5c405a(0x204)][_0x5c405a(0x1fb)](_0x1c5a26)&&(_0x5d0b1c(_0x5c405a(0x231),{'conversation':this,'model':_0x1c5a26}),_0x1c5a26=(await this[_0x5c405a(0x204)][_0x5c405a(0x23e)]())[0x0]):(_0x5d0b1c(_0x5c405a(0x21b),{'conversation':this}),_0x1c5a26=(await this[_0x5c405a(0x204)][_0x5c405a(0x23e)]())[0x0]),_0x1c5a26['id']!==this[_0x5c405a(0x24e)]?.['id']&&(this[_0x5c405a(0x24e)]=_0x1c5a26,this[_0x5c405a(0x20c)][_0x5c405a(0x1eb)](),this[_0x5c405a(0x1e1)](_0x5c405a(0x225),{'selectedModel':_0x1c5a26}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x537c3d=_0x13fc;function _0x13fc(_0x555593,_0x4d3f02){var _0x577fd7=_0x577f();return _0x13fc=function(_0x13fc77,_0x385720){_0x13fc77=_0x13fc77-0xb0;var _0x3ca470=_0x577fd7[_0x13fc77];return _0x3ca470;},_0x13fc(_0x555593,_0x4d3f02);}(function(_0x121873,_0x385797){var _0x2e857e=_0x13fc,_0x1fdb01=_0x121873();while(!![]){try{var _0x3e529b=parseInt(_0x2e857e(0xc3))/0x1+-parseInt(_0x2e857e(0xc8))/0x2*(-parseInt(_0x2e857e(0xba))/0x3)+-parseInt(_0x2e857e(0xbd))/0x4+parseInt(_0x2e857e(0xc2))/0x5+parseInt(_0x2e857e(0xc5))/0x6*(parseInt(_0x2e857e(0xc7))/0x7)+-parseInt(_0x2e857e(0xb7))/0x8*(parseInt(_0x2e857e(0xc0))/0x9)+parseInt(_0x2e857e(0xb6))/0xa*(parseInt(_0x2e857e(0xb1))/0xb);if(_0x3e529b===_0x385797)break;else _0x1fdb01['push'](_0x1fdb01['shift']());}catch(_0x3e5796){_0x1fdb01['push'](_0x1fdb01['shift']());}}}(_0x577f,0xdf637));import{AICapabilities as _0x1286f6}from'../../aicore/model/aicapabilities.js';function _0x577f(){var _0x128b3a=['2530388oNROYD','sendRequest','getCapabilitiesRequestData','11300967TEZYQU','current-document','5685645hvhFJn','376147xAoiBw','connector','2712MRAKbF','mapContextItemsToRequestData','3801CNsuiY','1910mpNoUF','getDocumentContext','268202OfbSyU','userMessage','contextItems','model','get','410BiMBmT','8glldPX','queryAssistant','quickActionData','141cpDqed','capabilities','conversationId'];_0x577f=function(){return _0x128b3a;};return _0x577f();}import{AIInteraction as _0x373c9a}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x344f60}from'./aichatcontext.js';export class AIChatInteraction extends _0x373c9a{[_0x537c3d(0xb2)];[_0x537c3d(0xbc)];[_0x537c3d(0xb3)]=new Map();[_0x537c3d(0xb4)];[_0x537c3d(0xb9)];constructor(_0x318564){var _0x97eea0=_0x537c3d;super(_0x318564),this[_0x97eea0(0xbc)]=_0x318564[_0x97eea0(0xbc)],this[_0x97eea0(0xb3)]=_0x318564[_0x97eea0(0xb3)],this[_0x97eea0(0xbb)]=_0x318564[_0x97eea0(0xbb)],this[_0x97eea0(0xb2)]=_0x318564[_0x97eea0(0xb2)],this[_0x97eea0(0xb4)]=_0x318564[_0x97eea0(0xb4)],this[_0x97eea0(0xb9)]=_0x318564[_0x97eea0(0xb9)];}async[_0x537c3d(0xbe)](){var _0x29fac2=_0x537c3d;return this[_0x29fac2(0xc4)][_0x29fac2(0xb8)]({'message':this[_0x29fac2(0xb2)],'conversationId':this[_0x29fac2(0xbc)],'parts':_0x344f60[_0x29fac2(0xc6)](this[_0x29fac2(0xb3)]),'capabilities':_0x1286f6[_0x29fac2(0xbf)](this[_0x29fac2(0xbb)]),'model':this[_0x29fac2(0xb4)],'quickActionData':this[_0x29fac2(0xb9)]});}[_0x537c3d(0xb0)](){var _0x31e338=_0x537c3d;return this[_0x31e338(0xb3)][_0x31e338(0xb5)](_0x31e338(0xc1));}}
|