@ckeditor/ckeditor5-ai 47.1.0-alpha.0 → 47.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +4 -4
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +15 -15
  150. package/src/aiactions/aiactions.js +1 -1
  151. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  152. package/src/aiactions/model/aiactionsreply.js +1 -1
  153. package/src/aiassistant/adapters/aiadapter.js +1 -1
  154. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  155. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  156. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  157. package/src/aiassistant/aiassistant.js +1 -1
  158. package/src/aiassistant/aiassistantediting.js +1 -1
  159. package/src/aiassistant/aiassistantui.js +1 -1
  160. package/src/aiassistant/legacyerrors.js +1 -1
  161. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  162. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  163. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  164. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  165. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  166. package/src/aiassistant/ui/form/aiformview.js +1 -1
  167. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  168. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  169. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  170. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  171. package/src/aiassistant/utils/common-translations.js +1 -1
  172. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  173. package/src/aiballoon/aiballoon.js +1 -1
  174. package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
  175. package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
  176. package/src/aiballoon/ui/aiballoonview.js +1 -1
  177. package/src/aichat/aichat.js +1 -1
  178. package/src/aichat/aichatcontroller.js +1 -1
  179. package/src/aichat/aichatui.js +1 -1
  180. package/src/aichat/model/aichatcontext.js +1 -1
  181. package/src/aichat/model/aichatconversation.js +1 -1
  182. package/src/aichat/model/aichatinteraction.js +1 -1
  183. package/src/aichat/model/aichatmodels.js +1 -1
  184. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  185. package/src/aichat/ui/aichatfeedview.js +1 -1
  186. package/src/aichat/ui/aichatheaderview.js +1 -1
  187. package/src/aichat/ui/aichatview.js +1 -1
  188. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  189. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  190. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  191. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  192. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  193. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  194. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  195. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  196. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  197. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  198. package/src/aichat/ui/controls/resources/aichatresourceslistview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  200. package/src/aichat/ui/controls/resources/aichatresourcesview.js +1 -1
  201. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  202. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  203. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  204. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  205. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  206. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  207. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  208. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  209. package/src/aichat/utils/eventnames.js +1 -1
  210. package/src/aichat/utils/promisequeue.js +1 -1
  211. package/src/aichat/utils/scrollmanager.js +1 -1
  212. package/src/aichathistory/aichathistory.js +1 -1
  213. package/src/aichathistory/aichathistorycontroller.js +1 -1
  214. package/src/aichathistory/aichathistoryui.js +1 -1
  215. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  216. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  217. package/src/aichathistory/ui/aichathistorylistitemview.js +1 -1
  218. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  219. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  220. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  221. package/src/aicore/aiconnector.js +1 -1
  222. package/src/aicore/aiediting.js +1 -1
  223. package/src/aicore/model/aicapabilities.js +1 -1
  224. package/src/aicore/model/aicontext.js +1 -1
  225. package/src/aicore/model/aiinteraction.js +1 -1
  226. package/src/aicore/model/aireply.js +1 -1
  227. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  228. package/src/aicore/pipeline/airesponseparser.js +2 -2
  229. package/src/aicore/ui/aidisclaimerview.js +1 -1
  230. package/src/aicore/ui/aiskeleton.js +1 -1
  231. package/src/aicore/ui/aispinner.js +1 -1
  232. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  233. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  234. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  235. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  236. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  237. package/src/aicore/utils/common-translations.js +1 -1
  238. package/src/aicore/utils/createresizebutton.js +1 -1
  239. package/src/aicore/utils/documentposition.js +1 -1
  240. package/src/aicore/utils/documentrange.js +1 -1
  241. package/src/aicore/utils/eventnames.js +1 -1
  242. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  243. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  244. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  245. package/src/aicore/utils/htmlparser.js +1 -1
  246. package/src/aicore/utils/htmlstreamer.js +1 -1
  247. package/src/aieditorintegration/aieditorintegration.js +1 -1
  248. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  249. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  250. package/src/aiquickactions/aiquickactions.js +1 -1
  251. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  252. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  253. package/src/aiquickactions/aiquickactionsui.js +1 -1
  254. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  255. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  256. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  257. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  258. package/src/aireviewmode/aireviewmode.js +1 -1
  259. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  260. package/src/aireviewmode/aireviewmodeediting.js +1 -1
  261. package/src/aireviewmode/aireviewmodeui.js +1 -1
  262. package/src/aireviewmode/model/aireviewcheck.js +1 -1
  263. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  264. package/src/aireviewmode/model/aireviewchecklist.js +1 -1
  265. package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
  266. package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
  267. package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
  268. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  269. package/src/aireviewmode/model/aireviewmodels.js +1 -1
  270. package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
  271. package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
  272. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
  273. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
  274. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
  275. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
  276. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
  277. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
  278. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
  279. package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
  280. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
  281. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
  282. package/src/aitabs/aitabs.js +1 -1
  283. package/src/aitabs/aitabsmainview.js +1 -1
  284. package/src/aitabs/tabs/aitabsview.js +1 -1
  285. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  286. package/src/aitabs/tabs/tabpanelview.js +1 -1
  287. package/src/errors.js +1 -1
  288. package/src/index.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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);}}
23
+ const _0x2959fe=_0x3cb2;(function(_0x90bfeb,_0x36bf0e){const _0x22d784=_0x3cb2,_0x2cc018=_0x90bfeb();while(!![]){try{const _0x5bd652=-parseInt(_0x22d784(0xc4))/0x1+parseInt(_0x22d784(0x1ba))/0x2+-parseInt(_0x22d784(0xb9))/0x3*(-parseInt(_0x22d784(0x108))/0x4)+-parseInt(_0x22d784(0x1e4))/0x5*(parseInt(_0x22d784(0x13e))/0x6)+parseInt(_0x22d784(0x10e))/0x7*(-parseInt(_0x22d784(0x13d))/0x8)+parseInt(_0x22d784(0x1a0))/0x9+parseInt(_0x22d784(0x1e3))/0xa;if(_0x5bd652===_0x36bf0e)break;else _0x2cc018['push'](_0x2cc018['shift']());}catch(_0x38b62e){_0x2cc018['push'](_0x2cc018['shift']());}}}(_0x3ec8,0xa315e));import{ContextPlugin as _0x3bc28d,Editor as _0x154d8f}from'ckeditor5/src/core.js';import{CKEditorError as _0x5f5d65,logError as _0x11d9f0,scrollViewportToShowTarget as _0x51d042,uid as _0x206d05}from'ckeditor5/src/utils.js';function _0x3ec8(){const _0x9883eb=['node','addFeedItemAIReply','requires','maxOffset','map','resetMessageInput','contextItems','toggleSuggestionDisplayMode','sources','showDiff','path','ai-chat-controller-no-active-conversation','getInteraction','listenTo','ai-chat-resource-load-failed','_removeAISelectionMarkers','has','Disliked\x20response','sourceResourcesLoaded','config','isCurrentDocumentInContext','collaboration.channelId','DocumentCompare','AI_CHAT_ABORTED_MESSAGE','query','range','addSelectionToContext','children','ai-request-aborted','isPremiumPlugin','domConverter','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','1787104MIQUkY','217734gBjPHa','forEach','updateCurrentDocumentInContext','AI_CHAT_CONTEXT_INVALID_DATA','AI_CHAT_UNTITLED_CONVERSATION','baseVersion','ai-conversation-','AIEditing','ai-chat-context-unsupported-type','sourcePosition','isModelAvailable','getRanges','updateFeedItemAIReplySuggestionPartState','plugins','get','showChangeInText','editors','locale','_handleStartConversation','model','getRoot','loadConversation','changeGroups','getReply','selectModel','_scrollToSuggestionRange','filter','ai-chat-source-resources-load-failed','webSearchStarted','removeFromContext','resource','contextSent','like','_stopLastInteraction','undo','startsWith','_aiChatModels','AIChatController','rootName','content','load','_handleUIUserMessage','getAttribute','getChildren','find','contextItemAdded','addResourceToContext','end','clearConversationContextUI','disableControls','setChangeGroupState','uid','setLoadingMessage','documentContextContent','reasoningStarted','startInteraction','_createFromRanges','updateCapabilities','getPath','sendUserMessage','finishInteraction','history','hideFakeVisualSelection','insertSuggestion','updateFeedItemAIReplyContent','replyContentUpdated','isDocumentOperation','start','addDocumentToContext','toggleWebSearch','uploadProgressChanged','delete','setSelectedModel','dialogClosed','streaming','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','updateContent','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','interactionStarted','_applyOperationsAsSuggestions','replyCreated','replies','howMany','isLoading','add','addFileToContext','dislike','full','setModel','setConversationTitle','AITabs','_aiChatUi','populateSourceResourceBalloon','close','applySuggestion','createPositionFromPath','ai-chat-controller-mouse-over','version','1888092GNnahj','mouseOverSuggestion','addFeedItemUserMessage','data','isOfficialPlugin','getTransformedByOperation','closeSourceResourceBalloon','ai-chat-file-upload-failed','partIndex','setContextItemLoading','rejectSuggestion','nextSibling','_insertSuggestion','cloneNode','getMarkersGroup','removeFeedInteraction','Undo','createConversation','stopListening','toggleReasoning','clearPendingContextUI','unshift','rejected','context','log','push','958602WPdWYQ','getDocumentContext','addFilesToContext','AIConnector','activeConversation','contextItem','setIsMaximized','error','addContextOptionsChanged','current-document','toViewRange','mouseLeaveSuggestion','ai-chat-missing-channel-id','AI_CHAT_GENERIC_ERROR','showNext','changes','upsertAIChatRating','ai.chat.models.displayedModels','_updateReplyContent','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','change','isOpen','_openBalloonFor','alignToTop','isDisabled','ready','isUploadInProgress','removeSelectionFromChatContext','isInContext','anchorId','resetConversationTitle','new','interactionDestroyed','parse','addCurrentDocumentToContext','handleRemovedConversation','text-delta','markers','modelSelected','addUrlToContext','showPrevious','13429600fKVfhn','170qKveVc','setFeedItemRenderingStrategy','data-id','revert','resourceId','resizeTabs','startConversation','indexOf','addOperation','mapper','interactionId','updateResourceState','accepted','_applySuggestion','updateFeedItemAIReplySuggestionContent','updateConversationTitle','AIChatUI','root','ai-chat-context-invalid-data','getOperations','createPositionAt','applyOperation','updateFeedItemAIReplySources','addFeedItemAISuggestion','AI_CHAT_UNABLE_TO_START_CONVERSATION','_getDocumentRangeForReplyChanges','_logError','addFeedInteractionHeader','removeMarker','stop','pending','focusPromptInput','toggleLoadingSkeleton','handleUserInteraction','set','remove','reasoningFinished','_aiEditing','setAddContextOptions','afterInit','viewRangeToDom','createRange','toString','replyId','436470dWbZNe','contextItemLoadingEnded','_batchToChanges','static','batch','ai.chat.context','ai-chat-url-upload-failed','activateTab','getDocumentData','length','showFakeVisualSelection','410899YWFAOy','abortPromptStream','slice','replyChangeGroupStateUpdated','removeSelectionFromContext','ai-chat-conversation-start-failed','type','interactionFinished','resources','resize','capabilitiesUpdated','message','main','_flushLastInteractionUI','isCurrentDocumentInConversation','getFirstRange','Showing\x20conversation\x20history...','sourceId','resourceStateChanged','split','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','getInteractionAndReplyById','getSelectionText','Failed\x20to\x20load\x20conversation','removeContextItem','_integrateEditor','lastInteraction','marker','options','_previewedChangeGroup','$graveyard','_aiConnector','isStarted','addSelectionToChatContext','getChildAtOffset','contextItemRemoved','document','conversationInitialized','_toggleReasoning','sendMessage','source','_balloonShowDiff','pluginName','stopInteraction','ai-chat-conversation-init-failed','scrollFeedToSuggestion','getGroupId','modification-delta','getChild','view','addFeedItemError','addContextItem','outdated','redo','setConversationContext','addFeedItemStaticMessage','open','from','getDiff','messageId','editing','state','_toggleWebSearch','enableControls','resizedTabs','loadSourceResources','Liked\x20response','AI_BALLOON_HEADER_TITLE','20qONmYQ','_removeFromContext','chat','setIsUploadInProgress','ai.chat.models.defaultModelId','removed','14SfnhfM','commands','_startConversationSafely','_showConversationHistory','_setIsMaximized','AI_CHAT_RESOURCE_LOAD_FAILED','selectedModel','selection','indexes','TrackChangesEditing','init','_updateRatings','webSearchFinished','uiId','interactionCreated'];_0x3ec8=function(){return _0x9883eb;};return _0x3ec8();}import{AIConnector as _0x3490d3}from'../aicore/aiconnector.js';import{AITabs as _0x26399c}from'../aitabs/aitabs.js';import{AIChatConversation as _0x2606c7}from'./model/aichatconversation.js';function _0x3cb2(_0x50f553,_0x9d9da){const _0x3ec81b=_0x3ec8();return _0x3cb2=function(_0x3cb2de,_0x14665a){_0x3cb2de=_0x3cb2de-0xb3;let _0x167c44=_0x3ec81b[_0x3cb2de];return _0x167c44;},_0x3cb2(_0x50f553,_0x9d9da);}import{getTranslation as _0x551fe0}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x1acfd1}from'../aicore/aiediting.js';import{AIChatModels as _0x5bc5e8}from'./model/aichatmodels.js';import{getEditorFromContext as _0x2ef871}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x59eb4a,DATA_ID_MODEL_ATTRIBUTE as _0x597eef}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x489a7d}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x40c1c7,getMinimalSelection as _0x57681d,getSuggestionPartsFromReply as _0x53055b}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x257a5e,_DetachOperation as _0x4fc256}from'ckeditor5/src/engine.js';import{findOne as _0x30d9ab,getAttribute as _0xf55265,serialize as _0x19df6a,Document as _0x3f36a5,findByAttribute as _0x29445a}from'../aicore/utils/htmlparser.js';import{IconAI as _0x223375}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0xeb076d}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x456468}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x3bc28d{[_0x2959fe(0x209)];[_0x2959fe(0xe3)];[_0x2959fe(0x199)];[_0x2959fe(0x162)];[_0x2959fe(0xbb)]=new Map();[_0x2959fe(0xe1)]=null;[_0x2959fe(0xed)]=!0x1;static get[_0x2959fe(0x11f)](){return[_0x3490d3,_0x456468,_0x59eb4a];}static get[_0x2959fe(0xee)](){const _0xc96560=_0x2959fe;return _0xc96560(0x163);}static get[_0x2959fe(0x1a4)](){return!0x0;}static get[_0x2959fe(0x13a)](){return!0x0;}[_0x2959fe(0x118)](){const _0x105620=_0x2959fe;this[_0x105620(0xe3)]=this[_0x105620(0x1b7)][_0x105620(0x14b)][_0x105620(0x14c)](_0x105620(0x1bd)),this[_0x105620(0x199)]=this[_0x105620(0x1b7)][_0x105620(0x14b)][_0x105620(0x14c)](_0x105620(0x1f4)),this[_0x105620(0x209)]=this[_0x105620(0x1b7)][_0x105620(0x14b)][_0x105620(0x14c)](_0x105620(0x145)),this[_0x105620(0x162)]=new _0x5bc5e8({'connector':this[_0x105620(0xe3)],'displayedModels':this[_0x105620(0x1b7)][_0x105620(0x130)][_0x105620(0x14c)](_0x105620(0x1cb)),'defaultModelId':this[_0x105620(0x1b7)][_0x105620(0x130)][_0x105620(0x14c)](_0x105620(0x10c))});const _0x2c6c1b=this[_0x105620(0x1b7)][_0x105620(0x14b)][_0x105620(0x14c)](_0x105620(0x198));this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1ea),()=>{const _0x4a11c2=_0x105620;this[_0x4a11c2(0x110)]();}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x179),(_0x469283,_0x1a29cf)=>{const _0x5aec23=_0x105620;this[_0x5aec23(0x167)]({'userMessage':_0x1a29cf});}),this[_0x105620(0x12a)](_0x2c6c1b,_0x105620(0x104),(_0x7344f5,_0x544892)=>{const _0x896a9d=_0x105620;this[_0x896a9d(0x112)](_0x544892);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1e9),()=>{const _0x4000db=_0x105620;_0x2c6c1b[_0x4000db(0xcd)]();}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0xc5),async()=>{const _0x3d15f4=_0x105620;await this[_0x3d15f4(0x15f)](),await this[_0x3d15f4(0xd1)]();}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x182),()=>{const _0xb4d286=_0x105620;this[_0xb4d286(0x1be)]?.[_0xb4d286(0x1dc)](_0x551fe0(this[_0xb4d286(0x1b7)][_0xb4d286(0x14f)],_0xb4d286(0x1cd)));}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x193),(_0x37c942,_0x49645d)=>{const _0x505165=_0x105620;this[_0x505165(0x1be)]?.[_0x505165(0x1bc)](Array[_0x505165(0xfd)](_0x49645d));}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1e1),(_0x1c8363,_0x530f80)=>{const _0x35e56b=_0x105620;this[_0x35e56b(0x1be)]?.[_0x35e56b(0x1e1)](_0x530f80);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x16c),(_0x5f29b9,_0x1cc5a3)=>{const _0xaf2ddb=_0x105620;this[_0xaf2ddb(0x1be)]?.[_0xaf2ddb(0x16c)](_0x1cc5a3[_0xaf2ddb(0xec)],_0x1cc5a3[_0xaf2ddb(0x15c)]);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0xdc),(_0x20d6a8,_0x5c2845)=>{const _0xe7fbf2=_0x105620;this[_0xe7fbf2(0x109)](_0x5c2845);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x105),(_0x8c85ac,_0x3c7170)=>{const _0x8e63e1=_0x105620;this[_0x8e63e1(0x1be)]?.[_0x8e63e1(0x105)](_0x3c7170[_0x8e63e1(0xd5)],_0x3c7170[_0x8e63e1(0x135)],_0x3c7170[_0x8e63e1(0x171)]);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x183),()=>{const _0x1be702=_0x105620;this[_0x1be702(0x102)]();}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1b3),()=>{const _0x351ceb=_0x105620;this[_0x351ceb(0xea)]();}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x156),(_0x50408a,_0x541300)=>{const _0x52d8f3=_0x105620;this[_0x52d8f3(0x1be)]?.[_0x52d8f3(0x196)](_0x541300);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x15e),(_0x5021e8,{replyId:_0x3a2079})=>{const _0x1aac86=_0x105620;console[_0x1aac86(0x1b8)](_0x1aac86(0x106),_0x3a2079);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x194),(_0x1029bc,{replyId:_0x1e2d58})=>{const _0xc4718a=_0x105620;console[_0xc4718a(0x1b8)](_0xc4718a(0x12e),_0x1e2d58);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x17d),(_0x91b1b3,_0x3fa172)=>{const _0x57a966=_0x105620;this[_0x57a966(0x1b7)][_0x57a966(0x14b)][_0x57a966(0x14c)](_0x456468)[_0x57a966(0x19b)](),this[_0x57a966(0x1ac)](_0x3fa172);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x14d),(_0x13191f,{replyId:_0xc30147,partIndex:_0x185218})=>{const _0x248e41=_0x105620;this[_0x248e41(0xed)]=this[_0x248e41(0x199)][_0x248e41(0x126)],this[_0x248e41(0x1d0)](_0xc30147,_0x185218);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1a1),(_0x51da18,{replyId:_0x564c79,partIndex:_0x5c96b5})=>{const _0x46b0cf=_0x105620,_0x47e158=this[_0x46b0cf(0x1fd)](_0x564c79,_0x5c96b5);_0x47e158&&_0x46b0cf(0xe2)!=_0x47e158[_0x46b0cf(0x136)][_0x46b0cf(0x1f5)][_0x46b0cf(0x164)]&&this[_0x46b0cf(0x209)][_0x46b0cf(0xc3)]([_0x47e158[_0x46b0cf(0x136)]],_0x46b0cf(0x19e));}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1c5),()=>{const _0x4aff55=_0x105620;this[_0x4aff55(0x209)][_0x4aff55(0x17c)](_0x4aff55(0x19e));}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x19c),(_0xe47c2c,_0x3705c1)=>{const _0x1b32cc=_0x105620;this[_0x1b32cc(0x1b7)][_0x1b32cc(0x14b)][_0x1b32cc(0x14c)](_0x456468)[_0x1b32cc(0x19b)](),this[_0x1b32cc(0x1f1)](_0x3705c1);}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x124),async(_0x18bdad,_0x30d51a)=>{const _0x3034ee=_0x105620,{reply:_0x5d1c92}=this[_0x3034ee(0xd9)](_0x30d51a[_0x3034ee(0xb8)]),_0x5bdf2a=_0x2ef871(this[_0x3034ee(0x1b7)]),_0x52db42=_0x53055b({'editor':_0x5bdf2a,'changeGroups':_0x5d1c92[_0x3034ee(0x154)],'documentContextContent':_0x5d1c92[_0x3034ee(0x173)],'showDiff':_0x30d51a[_0x3034ee(0x126)]});await this[_0x3034ee(0x199)][_0x3034ee(0x1f2)]({'id':_0x5d1c92['id'],'parts':_0x52db42,'renderingStrategy':_0x3034ee(0xbc)});}),this[_0x105620(0x12a)](this[_0x105620(0x199)],_0x105620(0x1aa),(_0x363f35,{replyId:_0x57a26f,partIndex:_0x20050a})=>{const _0x3977cd=_0x105620;this[_0x3977cd(0xe1)]?.[_0x3977cd(0xb8)]==_0x57a26f&&this[_0x3977cd(0xe1)]?.[_0x3977cd(0x1a8)]==_0x20050a&&this[_0x3977cd(0x1b7)][_0x3977cd(0x14b)][_0x3977cd(0x14c)](_0x456468)[_0x3977cd(0x19b)]();const {reply:_0x573a62}=this[_0x3977cd(0xd9)](_0x57a26f);_0x573a62[_0x3977cd(0x170)](_0x20050a,_0x3977cd(0x1b6)),this[_0x3977cd(0x209)][_0x3977cd(0x17c)](_0x3977cd(0x19e));});}async[_0x2959fe(0xb4)](){const _0x48e406=_0x2959fe;this[_0x48e406(0x1b7)]instanceof _0x154d8f?this[_0x48e406(0xdd)](this[_0x48e406(0x1b7)]):this[_0x48e406(0x12a)](this[_0x48e406(0x1b7)][_0x48e406(0x14e)],_0x48e406(0x192),(_0x2ca8e1,_0x3f57ec)=>{const _0x55f13b=_0x48e406;_0x3f57ec['on'](_0x55f13b(0x1d3),()=>{const _0x302d7b=_0x55f13b;this[_0x302d7b(0xdd)](_0x3f57ec);});}),await this[_0x48e406(0x110)]();}[_0x2959fe(0x1ac)](_0x3edadc){const _0x34a34b=_0x2959fe,_0x7275b4=_0x2ef871(this[_0x34a34b(0x1b7)]);if(!_0x7275b4[_0x34a34b(0x14b)][_0x34a34b(0x12d)](_0x34a34b(0x117)))return;const _0x26d785=this[_0x34a34b(0x1b7)][_0x34a34b(0x14b)][_0x34a34b(0x14c)](_0x34a34b(0x133)),{reply:_0x126a8f,interaction:_0x37fdf4}=this[_0x34a34b(0xd9)](_0x3edadc[_0x34a34b(0xb8)]),_0x23ae24=this[_0x34a34b(0x1fd)](_0x3edadc[_0x34a34b(0xb8)],_0x3edadc[_0x34a34b(0x1a8)]),_0x347dbf=void 0x0!==_0x3edadc[_0x34a34b(0x1a8)]?[_0x126a8f[_0x34a34b(0x154)][_0x3edadc[_0x34a34b(0x1a8)]]]:_0x126a8f[_0x34a34b(0x154)][_0x34a34b(0x158)](_0x2fa1aa=>_0x34a34b(0x202)==_0x2fa1aa[_0x34a34b(0x101)]),_0x948a97=_0x347dbf[_0x34a34b(0x121)](_0x208c66=>_0x126a8f[_0x34a34b(0x154)][_0x34a34b(0x1eb)](_0x208c66));if(!_0x23ae24||_0x34a34b(0xe2)==_0x23ae24[_0x34a34b(0x136)][_0x34a34b(0x1f5)][_0x34a34b(0x164)])return void _0x948a97[_0x34a34b(0x13f)](_0x45e5be=>_0x126a8f[_0x34a34b(0x170)](_0x45e5be,_0x34a34b(0xf8)));_0x948a97[_0x34a34b(0x13f)](_0x15ff3c=>_0x126a8f[_0x34a34b(0x170)](_0x15ff3c,_0x34a34b(0x1f0)));const _0x352a31=_0x489a7d({'editor':_0x7275b4,'reply':_0x126a8f,'interaction':_0x37fdf4,'groups':_0x347dbf,'transform':!0x0,'documentCompare':_0x26d785,'documentCompareOptions':{'anchor':_0x34a34b(0xd0),'markDeletions':!0x0}});let _0x4899f0;_0x23ae24&&this[_0x34a34b(0x157)](_0x23ae24[_0x34a34b(0x136)]),_0x7275b4[_0x34a34b(0x151)][_0x34a34b(0x1ce)](_0x225011=>{const _0x2f0c5c=_0x34a34b;_0x4899f0=_0x225011[_0x2f0c5c(0xbd)],_0x7275b4[_0x2f0c5c(0x14b)][_0x2f0c5c(0x14c)](_0x2f0c5c(0x117))[_0x2f0c5c(0x18d)](_0x352a31),this[_0x2f0c5c(0x209)][_0x2f0c5c(0x17c)](_0x2f0c5c(0x19e));}),this[_0x34a34b(0xbb)][_0x34a34b(0x206)](_0x4899f0,{'interactionId':_0x37fdf4['id'],'replyId':_0x126a8f['id'],'indexes':_0x948a97[_0x34a34b(0xc6)]()}),this[_0x34a34b(0x119)](_0x126a8f);}[_0x2959fe(0x1f1)](_0xde7f4c){const _0x83be3c=_0x2959fe,_0x98870c=_0x2ef871(this[_0x83be3c(0x1b7)]),_0x34c75d=this[_0x83be3c(0x1b7)][_0x83be3c(0x14b)][_0x83be3c(0x14c)](_0x59eb4a),{reply:_0x363750,interaction:_0x4cfdf8}=this[_0x83be3c(0xd9)](_0xde7f4c[_0x83be3c(0xb8)]),_0x42f965=this[_0x83be3c(0x1fd)](_0xde7f4c[_0x83be3c(0xb8)],_0xde7f4c[_0x83be3c(0x1a8)]),_0x3d7d9b=void 0x0!==_0xde7f4c[_0x83be3c(0x1a8)]?[_0x363750[_0x83be3c(0x154)][_0xde7f4c[_0x83be3c(0x1a8)]]]:_0x363750[_0x83be3c(0x154)][_0x83be3c(0x158)](_0x21c9f8=>_0x83be3c(0x202)==_0x21c9f8[_0x83be3c(0x101)]),_0x5ada43=_0x3d7d9b[_0x83be3c(0x121)](_0x518859=>_0x363750[_0x83be3c(0x154)][_0x83be3c(0x1eb)](_0x518859));if(!_0x42f965||_0x83be3c(0xe2)==_0x42f965[_0x83be3c(0x136)][_0x83be3c(0x1f5)][_0x83be3c(0x164)])return void _0x5ada43[_0x83be3c(0x13f)](_0x23a099=>_0x363750[_0x83be3c(0x170)](_0x23a099,_0x83be3c(0xf8)));_0x5ada43[_0x83be3c(0x13f)](_0x397cd1=>_0x363750[_0x83be3c(0x170)](_0x397cd1,_0x83be3c(0x1f0)));const _0x3ffde5=_0x489a7d({'editor':_0x98870c,'reply':_0x363750,'interaction':_0x4cfdf8,'groups':_0x3d7d9b,'transform':!0x0,'documentCompare':_0x34c75d,'documentCompareOptions':{'anchor':_0x83be3c(0xd0),'markDeletions':!0x1}});let _0x39f395;_0x42f965&&this[_0x83be3c(0x157)](_0x42f965[_0x83be3c(0x136)]),_0x98870c[_0x83be3c(0x151)][_0x83be3c(0x1ce)](_0x2cb564=>{const _0x1e2b66=_0x83be3c;_0x39f395=_0x2cb564[_0x1e2b66(0xbd)];for(const _0x2da4ad of _0x3ffde5)_0x2da4ad[_0x1e2b66(0x143)]=_0x98870c[_0x1e2b66(0x151)][_0x1e2b66(0xe8)][_0x1e2b66(0x19f)],_0x2cb564[_0x1e2b66(0xbd)][_0x1e2b66(0x1ec)](_0x2da4ad),_0x98870c[_0x1e2b66(0x151)][_0x1e2b66(0x1f9)](_0x2da4ad);}),this[_0x83be3c(0xbb)][_0x83be3c(0x206)](_0x39f395,{'interactionId':_0x4cfdf8['id'],'replyId':_0x363750['id'],'indexes':_0x5ada43[_0x83be3c(0xc6)]()}),this[_0x83be3c(0x119)](_0x363750);}[_0x2959fe(0x1d0)](_0x9c9c6f,_0x5e7c04){const _0x2259f1=_0x2959fe,_0x6158e9=_0x2ef871(this[_0x2259f1(0x1b7)]),_0x3135b1=this[_0x2259f1(0x1fd)](_0x9c9c6f,_0x5e7c04),_0x385cdb=this[_0x2259f1(0x1b7)][_0x2259f1(0x14b)][_0x2259f1(0x14c)](_0x456468);if(!_0x3135b1)return void _0x385cdb[_0x2259f1(0x19b)]();const {range:_0x31ec89,currentIndex:_0x378253,previousIndex:_0x2dbb93,nextIndex:_0x2ccbb3}=_0x3135b1;if(_0x2259f1(0xe2)==_0x31ec89[_0x2259f1(0x1f5)][_0x2259f1(0x164)]){const {reply:_0x481668}=this[_0x2259f1(0xd9)](_0x9c9c6f);return _0x481668[_0x2259f1(0x170)](_0x378253,_0x2259f1(0xf8)),void _0x385cdb[_0x2259f1(0x19b)]();}if(this[_0x2259f1(0xe1)]?.[_0x2259f1(0xb8)]==_0x9c9c6f&&this[_0x2259f1(0xe1)]?.[_0x2259f1(0x1a8)]==_0x378253)return;this[_0x2259f1(0xe1)]={'replyId':_0x9c9c6f,'partIndex':_0x378253};const _0xf00882=new _0xeb076d(_0x6158e9[_0x2259f1(0x14f)],{'showDiff':this[_0x2259f1(0xed)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x2259f1(0x195)},'hideHeader':!0x0}),{reply:_0xf1b705}=this[_0x2259f1(0xd9)](_0x9c9c6f),_0x3a9f19=_0x53055b({'editor':_0x6158e9,'changeGroups':[_0xf1b705[_0x2259f1(0x154)][_0x378253]],'documentContextContent':_0xf1b705[_0x2259f1(0x173)],'showDiff':this[_0x2259f1(0xed)]});_0xf00882[_0x2259f1(0x18a)]({'parts':_0x3a9f19,'renderingStrategy':_0x2259f1(0xbc)});const _0x1976cf=_0x378253!==_0x2dbb93;this[_0x2259f1(0x157)](_0x31ec89,!0x0),_0x385cdb[_0x2259f1(0xfc)]({'index':_0x378253,'title':_0x551fe0(this[_0x2259f1(0x1b7)][_0x2259f1(0x14f)],_0x2259f1(0x107),(_0x378253+0x1)[_0x2259f1(0xb7)]()),'icon':_0x223375,'mainView':_0xf00882,'showRotator':_0x1976cf,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x31ec89]}),this[_0x2259f1(0x199)][_0x2259f1(0xf1)](_0x9c9c6f,_0x378253),this[_0x2259f1(0x12a)](_0xf00882,_0x2259f1(0x124),(_0x14500f,{showDiff:_0x2ddb09})=>{const _0x566c18=_0x2259f1;this[_0x566c18(0xed)]=_0x2ddb09;const {reply:_0x271569}=this[_0x566c18(0xd9)](_0x9c9c6f),_0x3ae910=_0x53055b({'editor':_0x6158e9,'changeGroups':[_0x271569[_0x566c18(0x154)][_0x378253]],'documentContextContent':_0x271569[_0x566c18(0x173)],'showDiff':_0x2ddb09});_0xf00882[_0x566c18(0x18a)]({'parts':_0x3ae910,'renderingStrategy':_0x566c18(0xbc)});}),this[_0x2259f1(0x12a)](_0x385cdb,_0x2259f1(0x19c),()=>{const _0x5213ee=_0x2259f1;this[_0x5213ee(0x1f1)]({'replyId':_0x9c9c6f,'partIndex':_0x378253}),_0x1976cf?this[_0x5213ee(0x1d0)](_0x9c9c6f,_0x2ccbb3):_0x385cdb[_0x5213ee(0x19b)]();}),this[_0x2259f1(0x12a)](_0x385cdb,_0x2259f1(0x17d),()=>{const _0x5b4b1c=_0x2259f1;this[_0x5b4b1c(0x1ac)]({'replyId':_0x9c9c6f,'partIndex':_0x378253}),_0x1976cf?this[_0x5b4b1c(0x1d0)](_0x9c9c6f,_0x2ccbb3):_0x385cdb[_0x5b4b1c(0x19b)]();}),_0x1976cf&&(this[_0x2259f1(0x12a)](_0x385cdb,_0x2259f1(0x1c8),()=>{const _0xb0dc68=_0x2259f1;this[_0xb0dc68(0x1d0)](_0x9c9c6f,_0x2ccbb3);}),this[_0x2259f1(0x12a)](_0x385cdb,_0x2259f1(0x1e2),()=>{const _0x519b18=_0x2259f1;this[_0x519b18(0x1d0)](_0x9c9c6f,_0x2dbb93);})),this[_0x2259f1(0x12a)](_0x385cdb,_0x2259f1(0x187),()=>{const _0x419c4d=_0x2259f1;this[_0x419c4d(0x1b2)](_0x385cdb),this[_0x419c4d(0x1b2)](_0xf00882),this[_0x419c4d(0xe1)]=null;});}[_0x2959fe(0x1fd)](_0x10b174,_0x52dda6){const _0x2578fd=_0x2959fe,_0x3fc402=_0x2ef871(this[_0x2578fd(0x1b7)]),{reply:_0x147812,interaction:_0x53b788}=this[_0x2578fd(0xd9)](_0x10b174),_0x294c86=_0x147812[_0x2578fd(0x154)][_0x2578fd(0x158)](_0x3a7bac=>_0x2578fd(0x202)==_0x3a7bac[_0x2578fd(0x101)]),_0x57e48f=_0x294c86[_0x2578fd(0x121)](_0x101b2c=>_0x147812[_0x2578fd(0x154)][_0x2578fd(0x1eb)](_0x101b2c));void 0x0===_0x52dda6&&(_0x52dda6=_0x57e48f[0x0]);const _0x44519c=_0x57e48f[_0x2578fd(0x1eb)](_0x52dda6);if(-0x1==_0x44519c)return null;const _0x6149ca=0x0==_0x44519c?_0x57e48f[_0x57e48f[_0x2578fd(0xc2)]-0x1]:_0x57e48f[_0x44519c-0x1],_0x16e04f=_0x44519c==_0x57e48f[_0x2578fd(0xc2)]-0x1?_0x57e48f[0x0]:_0x57e48f[_0x44519c+0x1],_0x30e6ec=_0x294c86[_0x44519c],_0x4222e8=new _0x3f36a5([]),_0x4ccfa8=new _0x3f36a5([]);for(const _0x4c581c of _0x30e6ec[_0x2578fd(0x1c9)])if(_0x2578fd(0x10d)!=_0x4c581c[_0x2578fd(0xca)]&&_0x4ccfa8[_0x2578fd(0x138)][_0x2578fd(0x1b9)](_0x4c581c[_0x2578fd(0x11d)][_0x2578fd(0x1ad)](!0x0)),_0x2578fd(0x1d9)!=_0x4c581c[_0x2578fd(0xca)]){const _0x4a65c5=_0x30d9ab(_0x2893ad=>_0xf55265(_0x2893ad,_0x2578fd(0x1e6))==_0x4c581c['id'],_0x147812[_0x2578fd(0x173)],!0x0);_0x4222e8[_0x2578fd(0x138)][_0x2578fd(0x1b9)](_0x4a65c5[_0x2578fd(0x1ad)](!0x0));}if(0x0==_0x4222e8[_0x2578fd(0x138)][_0x2578fd(0xc2)]){if(_0x30e6ec[_0x2578fd(0x1c9)][0x0][_0x2578fd(0x1d7)]){const _0x155faa=_0x29445a(_0x2578fd(0x1e6),_0x30e6ec[_0x2578fd(0x1c9)][0x0][_0x2578fd(0x1d7)],_0x147812[_0x2578fd(0x173)]);_0x4222e8[_0x2578fd(0x138)][_0x2578fd(0x1b5)](_0x155faa[_0x2578fd(0x1ad)](!0x0)),_0x4ccfa8[_0x2578fd(0x138)][_0x2578fd(0x1b5)](_0x155faa[_0x2578fd(0x1ad)](!0x0)),_0x155faa[_0x2578fd(0x1ab)]&&(_0x4222e8[_0x2578fd(0x138)][_0x2578fd(0x1b9)](_0x155faa[_0x2578fd(0x1ab)][_0x2578fd(0x1ad)](!0x0)),_0x4ccfa8[_0x2578fd(0x138)][_0x2578fd(0x1b9)](_0x155faa[_0x2578fd(0x1ab)][_0x2578fd(0x1ad)](!0x0)));}else{const _0x414e2e=_0x147812[_0x2578fd(0x173)][_0x2578fd(0x138)][0x0];if(!_0x414e2e)return null;_0x4222e8[_0x2578fd(0x138)][_0x2578fd(0x1b9)](_0x414e2e[_0x2578fd(0x1ad)](!0x0)),_0x4ccfa8[_0x2578fd(0x138)][_0x2578fd(0x1b9)](_0x414e2e[_0x2578fd(0x1ad)](!0x0));}}const _0x12e6ce=_0x53b788[_0x2578fd(0x1bb)](),_0x33bda0=_0x3fc402[_0x2578fd(0x1a3)][_0x2578fd(0x1db)](_0x12e6ce[_0x2578fd(0x165)]),_0x34958b=_0x19df6a(_0x4222e8),_0x253ee0=_0x3fc402[_0x2578fd(0x1a3)][_0x2578fd(0x1db)](_0x34958b),_0x1ee05b=_0x3fc402[_0x2578fd(0x1a3)][_0x2578fd(0x1db)](_0x34958b),_0x10df93=_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0x1f8)](_0x253ee0,0x0),_0x3672ed=_0x19df6a(_0x4ccfa8),_0x551bfa={'anchor':_0x10df93,'markDeletions':!0x1},_0x35b880=_0x3fc402[_0x2578fd(0x14b)][_0x2578fd(0x14c)](_0x59eb4a)[_0x2578fd(0xfe)](_0x34958b,_0x3672ed,_0x551bfa)[_0x2578fd(0x1f7)]();if(!_0x35b880[_0x2578fd(0xc2)])return null;_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0x1ce)](_0x2ff83e=>{const _0x4c7827=_0x2578fd;for(const _0x5a63b3 of _0x35b880)if(_0x4c7827(0x207)==_0x5a63b3[_0x4c7827(0xca)]){const _0x558739=_0x5a63b3[_0x4c7827(0x147)],_0x4473bb=_0x5a63b3[_0x4c7827(0x190)],_0x34dc51=new _0x4fc256(_0x558739,_0x4473bb);_0x2ff83e[_0x4c7827(0xbd)][_0x4c7827(0x1ec)](_0x34dc51),_0x3fc402[_0x4c7827(0x151)][_0x4c7827(0x1f9)](_0x34dc51);}else _0x4c7827(0xdf)!==_0x5a63b3[_0x4c7827(0xca)]&&(_0x5a63b3[_0x4c7827(0x143)]=null,_0x5a63b3[_0x4c7827(0x180)]=!0x1,_0x2ff83e[_0x4c7827(0xbd)][_0x4c7827(0x1ec)](_0x5a63b3),_0x3fc402[_0x4c7827(0x151)][_0x4c7827(0x1f9)](_0x5a63b3));});const _0x17a831=_0x57681d(_0x3fc402,_0x35b880,_0x253ee0);_0x40c1c7(_0x3fc402[_0x2578fd(0x151)],_0x17a831);const _0x59d54c=_0x17a831[_0x2578fd(0xd3)]()[_0x2578fd(0x181)][_0x2578fd(0x127)][_0x2578fd(0xc6)](),_0x581bef=_0x17a831[_0x2578fd(0xd3)]()[_0x2578fd(0x16d)][_0x2578fd(0x127)][_0x2578fd(0xc6)](),_0x468779=[];let _0xfc83e8=_0x253ee0,_0x5121e5=_0x1ee05b;for(let _0x45072c=0x0;_0x45072c<_0x581bef[_0x2578fd(0xc2)];_0x45072c++){const _0x128b95=_0xfc83e8[_0x2578fd(0x120)]-_0x581bef[_0x45072c];_0x468779[_0x45072c]=_0x5121e5[_0x2578fd(0x120)]-_0x128b95,_0xfc83e8=_0xfc83e8[_0x2578fd(0xe6)](_0x581bef[_0x45072c]),_0x5121e5=_0x5121e5[_0x2578fd(0xe6)](_0x468779[_0x45072c]);}const _0x31c6f5=_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0xb6)](_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0x19d)](_0x1ee05b,_0x59d54c),_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0x19d)](_0x1ee05b,_0x468779)),_0x3c623e=_0x1ee05b[_0x2578fd(0xf4)](0x0)[_0x2578fd(0x168)](_0x597eef),_0x342031=Array[_0x2578fd(0xfd)](_0x33bda0[_0x2578fd(0x169)]())[_0x2578fd(0x16a)](_0x66345e=>_0x66345e[_0x2578fd(0x168)](_0x597eef)==_0x3c623e)[_0x2578fd(0x178)](),_0x5882d9=_0x31c6f5[_0x2578fd(0x181)][_0x2578fd(0x127)][_0x2578fd(0xc6)](),_0x1a52e6=_0x31c6f5[_0x2578fd(0x16d)][_0x2578fd(0x127)][_0x2578fd(0xc6)]();_0x5882d9[0x0]=_0x342031[0x0]+_0x5882d9[0x0],_0x1a52e6[0x0]=_0x342031[0x0]+_0x1a52e6[0x0];let _0x2aa0ac=_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0xb6)](_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0x19d)](_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0xe8)][_0x2578fd(0x152)](),_0x5882d9),_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0x19d)](_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0xe8)][_0x2578fd(0x152)](),_0x1a52e6));const _0x4f8deb=_0x3fc402[_0x2578fd(0x151)][_0x2578fd(0xe8)][_0x2578fd(0x17b)][_0x2578fd(0x1f7)](_0x12e6ce[_0x2578fd(0x19f)]);for(const _0x21d9d6 of _0x4f8deb)_0x2aa0ac=_0x257a5e[_0x2578fd(0x176)](_0x2aa0ac[_0x2578fd(0x1a5)](_0x21d9d6));return{'range':_0x2aa0ac,'previousIndex':_0x6149ca,'nextIndex':_0x16e04f,'currentIndex':_0x52dda6};}[_0x2959fe(0xdd)](_0x464f91){const _0x15f72b=_0x2959fe;if(!_0x464f91[_0x15f72b(0x14b)][_0x15f72b(0x12d)](_0x15f72b(0x1b0)))return;const _0x1bd31e=_0x464f91[_0x15f72b(0x10f)][_0x15f72b(0x14c)](_0x15f72b(0x160)),_0x233c1c=_0x464f91[_0x15f72b(0x10f)][_0x15f72b(0x14c)](_0x15f72b(0xf9));this[_0x15f72b(0x12a)](_0x1bd31e,_0x15f72b(0x1e7),(_0x1f91c2,_0x4b29c8,_0x5cfcb8)=>{const _0x4e1883=_0x15f72b,_0x556ea6=this[_0x4e1883(0xbb)][_0x4e1883(0x14c)](_0x4b29c8);if(!_0x556ea6)return;const _0x91d6ee=this[_0x4e1883(0x1be)][_0x4e1883(0x129)](_0x556ea6[_0x4e1883(0x1ee)])[_0x4e1883(0x155)](_0x556ea6[_0x4e1883(0xb8)]);_0x556ea6[_0x4e1883(0x116)][_0x4e1883(0x13f)](_0x797ad6=>_0x91d6ee[_0x4e1883(0x170)](_0x797ad6,_0x4e1883(0x202))),this[_0x4e1883(0xbb)][_0x4e1883(0x185)](_0x4b29c8),this[_0x4e1883(0xbb)][_0x4e1883(0x206)](_0x5cfcb8,_0x556ea6);}),this[_0x15f72b(0x12a)](_0x233c1c,_0x15f72b(0x1e7),(_0x2b74b5,_0x497a3d,_0x53e8d1)=>{const _0x5a609a=_0x15f72b,_0x2fd06a=this[_0x5a609a(0xbb)][_0x5a609a(0x14c)](_0x497a3d);if(!_0x2fd06a)return;const _0x3a3aa2=this[_0x5a609a(0x1be)][_0x5a609a(0x129)](_0x2fd06a[_0x5a609a(0x1ee)])[_0x5a609a(0x155)](_0x2fd06a[_0x5a609a(0xb8)]);_0x2fd06a[_0x5a609a(0x116)][_0x5a609a(0x13f)](_0x16e53c=>_0x3a3aa2[_0x5a609a(0x170)](_0x16e53c,_0x5a609a(0x1f0))),this[_0x5a609a(0xbb)][_0x5a609a(0x185)](_0x497a3d),this[_0x5a609a(0xbb)][_0x5a609a(0x206)](_0x53e8d1,_0x2fd06a);});}async[_0x2959fe(0x153)](_0x4c5fa8){const _0x136a8f=_0x2959fe;this[_0x136a8f(0x1b7)][_0x136a8f(0x14b)][_0x136a8f(0x14c)](_0x456468)[_0x136a8f(0x19b)](),this[_0x136a8f(0x199)][_0x136a8f(0x1e5)](_0x136a8f(0xbc)),this[_0x136a8f(0x199)][_0x136a8f(0x204)](!0x0),await this[_0x136a8f(0x15f)]();try{const _0x29b463=this[_0x136a8f(0x1b7)][_0x136a8f(0x14b)][_0x136a8f(0x14c)](_0x26399c);this[_0x136a8f(0x1f3)]('\x20'),_0x29b463[_0x136a8f(0xf5)][_0x136a8f(0xc0)](_0x136a8f(0x10a)),await this[_0x136a8f(0x110)](_0x4c5fa8);const {sessionId:_0x523df7}=this[_0x136a8f(0x209)][_0x136a8f(0xc1)]();await this[_0x136a8f(0x1be)][_0x136a8f(0x166)](_0x4c5fa8,_0x523df7),this[_0x136a8f(0x1be)][_0x136a8f(0xd2)]()&&this[_0x136a8f(0x1be)][_0x136a8f(0x1dc)](_0x551fe0(this[_0x136a8f(0x1b7)][_0x136a8f(0x14f)],_0x136a8f(0x1cd)));}catch(_0x3e1af2){console[_0x136a8f(0x1c1)](_0x136a8f(0xdb),_0x3e1af2);}finally{this[_0x136a8f(0x199)][_0x136a8f(0x1e5)](_0x136a8f(0x188)),this[_0x136a8f(0x199)][_0x136a8f(0x204)](!0x1);}}[_0x2959fe(0x1dd)](_0x535f1b){const _0x5244bb=_0x2959fe;this[_0x5244bb(0x1be)]['id']===_0x535f1b&&this[_0x5244bb(0x110)]();}async[_0x2959fe(0xe5)](){const _0x1cf702=_0x2959fe,_0x57c1c0=this[_0x1cf702(0x209)][_0x1cf702(0xda)]();this[_0x1cf702(0x1be)]?.[_0x1cf702(0x137)](_0x57c1c0),this[_0x1cf702(0x1be)]?.[_0x1cf702(0x1dc)](_0x551fe0(this[_0x1cf702(0x1b7)][_0x1cf702(0x14f)],_0x1cf702(0x1cd)));}[_0x2959fe(0x1d5)](){const _0x173fa6=_0x2959fe;this[_0x173fa6(0x1be)]?.[_0x173fa6(0xc8)]();}[_0x2959fe(0x203)](){const _0x529d9a=_0x2959fe;this[_0x529d9a(0x199)][_0x529d9a(0x203)]();}async[_0x2959fe(0x1ea)](){const _0x2883f2=_0x2959fe;await this[_0x2883f2(0x110)]();}async[_0x2959fe(0xeb)]({message:_0x182555,quickActionData:_0x345e91}){const _0x41b6ee=_0x2959fe;await this[_0x41b6ee(0x167)]({'userMessage':_0x182555,'quickActionData':_0x345e91});}[_0x2959fe(0xf2)](){const _0x539475=_0x2959fe,_0x58e1d1=this[_0x539475(0x1b7)][_0x539475(0x130)][_0x539475(0x14c)](_0x539475(0x132));if(!_0x58e1d1)throw new _0x5f5d65(_0x539475(0x1c6),this);return _0x58e1d1;}async[_0x2959fe(0x110)](_0x21cca9){const _0x4f6b5b=_0x2959fe;try{this[_0x4f6b5b(0x199)][_0x4f6b5b(0x103)](),await this[_0x4f6b5b(0x150)](_0x21cca9);}catch(_0x329135){_0x11d9f0(_0x4f6b5b(0xc9),_0x329135),this[_0x4f6b5b(0x1be)]=void 0x0,this[_0x4f6b5b(0x199)][_0x4f6b5b(0x16f)]();}}async[_0x2959fe(0x150)](_0x1f2fb7){const _0x399e85=_0x2959fe,_0x390e4f=this[_0x399e85(0x1b7)][_0x399e85(0x14b)][_0x399e85(0x14c)](_0x456468);let _0x47aedb;_0x390e4f[_0x399e85(0x1cf)]&&_0x390e4f[_0x399e85(0x19b)](),_0x1f2fb7||!this[_0x399e85(0x1be)]?_0x47aedb=this[_0x399e85(0x1b7)][_0x399e85(0x130)][_0x399e85(0x14c)](_0x399e85(0x10c)):this[_0x399e85(0x199)][_0x399e85(0x148)]&&(_0x47aedb=this[_0x399e85(0x1be)][_0x399e85(0x114)]['id']),await this[_0x399e85(0x15f)]();const _0x2fd02c=this[_0x399e85(0xf2)](),_0x51717e=_0x1f2fb7||_0x206d05();this[_0x399e85(0x1be)]=new _0x2606c7({'connector':this[_0x399e85(0xe3)],'chatModels':this[_0x399e85(0x162)],'selectedModelId':_0x47aedb,'conversationId':_0x51717e,'group':_0x2fd02c,'getEditor':()=>_0x2ef871(this[_0x399e85(0x1b7)])}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xe9),(_0x684c80,_0x14eb71)=>{const _0x4f0ec8=_0x399e85;this[_0x4f0ec8(0x199)][_0x4f0ec8(0x1b1)](_0x14eb71),this[_0x4f0ec8(0x199)][_0x4f0ec8(0x122)](),this[_0x4f0ec8(0x199)][_0x4f0ec8(0x1b4)](),this[_0x4f0ec8(0x199)][_0x4f0ec8(0x16e)](),_0x1f2fb7||(this[_0x4f0ec8(0x199)][_0x4f0ec8(0x1d8)](),this[_0x4f0ec8(0x1be)]?.[_0x4f0ec8(0x1dc)](_0x551fe0(this[_0x4f0ec8(0x1b7)][_0x4f0ec8(0x14f)],_0x4f0ec8(0x1cd))));}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x184),(_0x565a43,_0x15a34a)=>{const _0x27f95d=_0x399e85;this[_0x27f95d(0x199)][_0x27f95d(0x10b)](_0x15a34a[_0x27f95d(0x1d4)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x11c),(_0x21da89,_0x1a3fee)=>{const _0x371f6c=_0x399e85;this[_0x371f6c(0x199)][_0x371f6c(0x1a2)](_0x1a3fee);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x15a),()=>{const _0x3b52c6=_0x399e85;this[_0x3b52c6(0x199)][_0x3b52c6(0x172)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x174),()=>{const _0x54f7de=_0x399e85;this[_0x54f7de(0x199)][_0x54f7de(0x172)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x11a),(_0x316786,_0x5ce372)=>{const _0x3fec5f=_0x399e85;this[_0x3fec5f(0x199)][_0x3fec5f(0x1ff)](_0x5ce372,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x208),(_0x4372fe,_0x240a3b)=>{const _0x483d74=_0x399e85;this[_0x483d74(0x199)][_0x483d74(0x1ff)](_0x240a3b,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x18c),()=>{const _0x3200e7=_0x399e85;this[_0x3200e7(0x199)][_0x3200e7(0x175)]();}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xcb),async()=>{const _0x1951b2=_0x399e85;await this[_0x1951b2(0x199)][_0x1951b2(0x17a)]();}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x1da),(_0x57b515,_0x23fc46)=>{const _0xd03d32=_0x399e85;this[_0xd03d32(0x199)][_0xd03d32(0x1af)](_0x23fc46['id']);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x197),(_0x2a18c1,_0x55b0ca,_0x26a327)=>{const _0x276a9d=_0x399e85;this[_0x276a9d(0x1f3)](_0x55b0ca,_0x26a327);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x18e),(_0x221f83,_0x3cc18b)=>{const _0x57e7b1=_0x399e85;_0x57e7b1(0x1de)===_0x3cc18b[_0x57e7b1(0xca)]?this[_0x57e7b1(0x199)][_0x57e7b1(0x11e)](_0x3cc18b):this[_0x57e7b1(0x199)][_0x57e7b1(0x1fb)](_0x3cc18b);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x17f),async(_0x2ea904,_0x4b3165,_0x1dfd99)=>{const _0x556233=_0x399e85;await this[_0x556233(0x1cc)]({'reply':_0x4b3165,'changeGroups':_0x1dfd99});}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xc7),(_0x378d00,{reply:_0x1262ef,index:_0x54e6e5,state:_0x22e682})=>{const _0xc22da0=_0x399e85;this[_0xc22da0(0x199)][_0xc22da0(0x14a)]({'id':_0x1262ef['id'],'index':_0x54e6e5,'state':_0x22e682});}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x16b),(_0xb031d4,_0x22d1b1)=>{const _0x4eb02d=_0x399e85;if(this[_0x4eb02d(0x199)][_0x4eb02d(0xf7)](_0x22d1b1[_0x4eb02d(0x1bf)],_0x22d1b1[_0x4eb02d(0x191)]),_0x4eb02d(0x115)===_0x22d1b1[_0x4eb02d(0x1bf)][_0x4eb02d(0xca)]){const _0x579688=[..._0x2ef871(this[_0x4eb02d(0x1b7)])[_0x4eb02d(0x151)][_0x4eb02d(0xe8)][_0x4eb02d(0x115)][_0x4eb02d(0x149)]()];this[_0x4eb02d(0x209)][_0x4eb02d(0xc3)](_0x579688,_0x4eb02d(0x144)+this[_0x4eb02d(0x1be)]?.['id']);}}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xe7),(_0x2e5716,_0x250ec4)=>{const _0x2d1433=_0x399e85;this[_0x2d1433(0x199)][_0x2d1433(0xdc)](_0x250ec4[_0x2d1433(0x11b)]),_0x2d1433(0x1c3)==_0x250ec4[_0x2d1433(0x11b)]&&this[_0x2d1433(0x1d5)](),_0x2d1433(0x115)===_0x250ec4[_0x2d1433(0xca)]&&this[_0x2d1433(0x209)][_0x2d1433(0x17c)](_0x2d1433(0x144)+this[_0x2d1433(0x1be)]?.['id']);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xba),(_0x5379cd,_0x53c6aa)=>{const _0x3c03db=_0x399e85;this[_0x3c03db(0x199)][_0x3c03db(0x1a9)](_0x53c6aa[_0x3c03db(0x1bf)][_0x3c03db(0x11b)],_0x53c6aa[_0x3c03db(0x191)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x15d),(_0x3620f8,_0x53c372)=>{const _0x3b7e03=_0x399e85;this[_0x3b7e03(0x199)][_0x3b7e03(0xfa)](_0x53c372[_0x3b7e03(0x123)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x1c2),(_0xc8ebdb,_0x351ea7)=>{const _0x4de075=_0x399e85;this[_0x4de075(0x199)][_0x4de075(0xb3)](_0x351ea7[_0x4de075(0xe0)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x12f),(_0x118190,_0x1d1f16)=>{const _0x168959=_0x399e85;this[_0x168959(0x199)][_0x168959(0x19a)](_0x1d1f16[_0x168959(0xd5)],_0x1d1f16[_0x168959(0xec)],_0x1d1f16[_0x168959(0xcc)],_0x1d1f16[_0x168959(0x171)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xd6),(_0x3f7b15,_0x20f6a0)=>{const _0x1e2d56=_0x399e85;this[_0x1e2d56(0x199)][_0x1e2d56(0x1ef)](_0x20f6a0[_0x1e2d56(0xd5)],_0x20f6a0[_0x1e2d56(0x1e8)],_0x20f6a0[_0x1e2d56(0x1d6)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0xce),(_0x5bbc8c,_0x552ea1)=>{const _0x109698=_0x399e85;this[_0x109698(0x199)][_0x109698(0x177)](_0x552ea1);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x1e0),(_0x3d05ac,_0x11ba49)=>{const _0x1c64f5=_0x399e85;this[_0x1c64f5(0x199)][_0x1c64f5(0x186)](_0x11ba49[_0x1c64f5(0x114)],_0x11ba49[_0x1c64f5(0x1d2)]);}),this[_0x399e85(0x1be)]['on'](_0x399e85(0x1c1),(_0x452b7a,{error:_0xbb1dfe,interactionId:_0x22c592,fileName:_0x264491,url:_0x1dc0ef,sourceId:_0x169691,sourceLabel:_0x1cb240})=>{const _0x4fc2d2=_0x399e85,_0x1b6494=_0x22c592?_0x22c592+':'+_0x206d05():_0x206d05();_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0x139))?this[_0x4fc2d2(0x199)][_0x4fc2d2(0xfb)]({'staticMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x134)),'id':_0x1b6494}):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0xf0))||_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0xc9))?(this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x1fc)),'id':_0x1b6494}),this[_0x4fc2d2(0x1fe)](_0xbb1dfe)):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0x1a7))?this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x18b),_0x264491),'id':_0x1b6494}):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0xbf))?this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x13c),_0x1dc0ef),'id':_0x1b6494}):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0x1f6))?this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x141)),'id':_0x1b6494}):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0x146))?this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0xd8)),'id':_0x1b6494}):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0x159))?(_0x169691&&this[_0x4fc2d2(0x199)][_0x4fc2d2(0x1a6)](_0x169691),this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x189),_0x1cb240||_0x4fc2d2(0xec)),'id':_0x1b6494}),this[_0x4fc2d2(0x1fe)](_0xbb1dfe)):_0xbb1dfe[_0x4fc2d2(0xcf)][_0x4fc2d2(0x161)](_0x4fc2d2(0x12b))?(this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x113)),'id':_0x1b6494}),this[_0x4fc2d2(0x1fe)](_0xbb1dfe)):(this[_0x4fc2d2(0x199)][_0x4fc2d2(0xf6)]({'errorMessage':_0x551fe0(this[_0x4fc2d2(0x1b7)][_0x4fc2d2(0x14f)],_0x4fc2d2(0x1c7)),'id':_0x1b6494}),this[_0x4fc2d2(0x1fe)](_0xbb1dfe));}),await this[_0x399e85(0x1be)][_0x399e85(0x118)](this[_0x399e85(0x1b7)][_0x399e85(0x130)][_0x399e85(0x14c)](_0x399e85(0xbe))),_0x1f2fb7||await this[_0x399e85(0x1be)][_0x399e85(0x181)]();}async[_0x2959fe(0x167)]({userMessage:_0x2a63ca,quickActionData:_0x47f5cc}){const _0x545caf=_0x2959fe;if(!this[_0x545caf(0x1be)])throw new _0x5f5d65(_0x545caf(0x128));this[_0x545caf(0x1be)][_0x545caf(0x131)]()&&await this[_0x545caf(0x1be)][_0x545caf(0x140)](this[_0x545caf(0x209)][_0x545caf(0xc1)]()),this[_0x545caf(0x1be)]['id']&&this[_0x545caf(0x1be)][_0x545caf(0xe4)]&&await this[_0x545caf(0x1be)][_0x545caf(0x205)]({'userMessage':_0x2a63ca,'quickActionData':_0x47f5cc}),this[_0x545caf(0x12c)]();}[_0x2959fe(0x12c)](){const _0x32f0ff=_0x2959fe,_0x4de66c=_0x2ef871(this[_0x32f0ff(0x1b7)])[_0x32f0ff(0x151)],_0x2dea04=Array[_0x32f0ff(0xfd)](_0x4de66c[_0x32f0ff(0x1df)][_0x32f0ff(0x1ae)](_0x1acfd1));_0x4de66c[_0x32f0ff(0x1ce)](_0x450964=>{const _0x561117=_0x32f0ff;_0x2dea04[_0x561117(0x13f)](_0x4590b2=>_0x450964[_0x561117(0x200)](_0x4590b2));});}[_0x2959fe(0x111)](){const _0x4ad8e1=_0x2959fe;console[_0x4ad8e1(0x1b8)](_0x4ad8e1(0xd4));}[_0x2959fe(0x112)](_0x1b72a0){const _0x5cfc02=_0x2959fe;this[_0x5cfc02(0x199)][_0x5cfc02(0x1c0)](_0x1b72a0);}[_0x2959fe(0x1fe)](_0x24265d){const _0x5d5f2a=_0x2959fe;_0x11d9f0(_0x24265d[_0x5d5f2a(0xcf)]);}[_0x2959fe(0x109)](_0x29f259){const _0x43b0a0=_0x2959fe;this[_0x43b0a0(0x1be)]?.[_0x43b0a0(0x15b)](_0x29f259);}[_0x2959fe(0x102)](){const _0x1b2b60=_0x2959fe;this[_0x1b2b60(0x1be)]?.[_0x1b2b60(0x183)]();}[_0x2959fe(0xea)](){const _0x4bdcb1=_0x2959fe;this[_0x4bdcb1(0x1be)]?.[_0x4bdcb1(0x1b3)]();}[_0x2959fe(0xd9)](_0x537b8c){const _0x3ac332=_0x2959fe,[_0x2fb562,_0xd7340b]=_0x537b8c[_0x3ac332(0xd7)](':'),_0x2ef1d4=this[_0x3ac332(0x1be)][_0x3ac332(0x129)](_0x2fb562),_0x3afd2f=_0x2ef1d4[_0x3ac332(0x155)](_0xd7340b);return{'interaction':_0x2ef1d4,'reply':_0x3afd2f};}[_0x2959fe(0x157)](_0x277e59,_0x182071=!0x1){const _0x3970be=_0x2959fe,_0xcf2b65=_0x2ef871(this[_0x3970be(0x1b7)]),_0x1c907c={'target':_0xcf2b65[_0x3970be(0x100)][_0x3970be(0xf5)][_0x3970be(0x13b)][_0x3970be(0xb5)](_0xcf2b65[_0x3970be(0x100)][_0x3970be(0x1ed)][_0x3970be(0x1c4)](_0x277e59)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x182071};_0x182071&&(_0x1c907c[_0x3970be(0x1d1)]=!0x0),_0x51d042(_0x1c907c);}[_0x2959fe(0x1f3)](_0x46b95b,_0xe58bc1=!0x1){const _0x3ee7ad=_0x2959fe;this[_0x3ee7ad(0x199)][_0x3ee7ad(0x197)](_0x46b95b||_0x551fe0(this[_0x3ee7ad(0x1b7)][_0x3ee7ad(0x14f)],_0x3ee7ad(0x142)),_0xe58bc1);}async[_0x2959fe(0x1cc)]({reply:_0x2bfc08,changeGroups:_0x49ed29,renderingStrategy:_0x39a377}){const _0x48c06e=_0x2959fe,{id:_0x4200bf,isDone:_0x2c856e,type:_0x146ac3,parsedContent:_0x1e0421}=_0x2bfc08;if(_0x48c06e(0xf3)===_0x146ac3){const _0x57e9e7=_0x2ef871(this[_0x48c06e(0x1b7)]),_0x2e98bb=_0x53055b({'editor':_0x57e9e7,'showDiff':this[_0x48c06e(0x199)][_0x48c06e(0x126)],'changeGroups':_0x49ed29,'documentContextContent':_0x2bfc08[_0x48c06e(0x173)]});await this[_0x48c06e(0x199)][_0x48c06e(0x1f2)]({'id':_0x4200bf,'parts':_0x2e98bb,'renderingStrategy':_0x39a377,'isDone':_0x2c856e});}else _0x48c06e(0x1de)===_0x146ac3&&await this[_0x48c06e(0x199)][_0x48c06e(0x17e)]({'id':_0x4200bf,'parsedContent':_0x1e0421,'renderingStrategy':_0x39a377,'isDone':_0x2c856e});_0x2c856e&&_0x2bfc08[_0x48c06e(0x125)][_0x48c06e(0xc2)]>0x0&&this[_0x48c06e(0x199)][_0x48c06e(0x1fa)](_0x4200bf,_0x2bfc08[_0x48c06e(0x125)]);}async[_0x2959fe(0x15f)](){const _0x27ad48=_0x2959fe,_0x1b30b2=this[_0x27ad48(0x1be)]?.[_0x27ad48(0xde)];_0x1b30b2&&(_0x1b30b2[_0x27ad48(0x201)](),this[_0x27ad48(0x199)][_0x27ad48(0xef)](_0x1b30b2));}async[_0x2959fe(0xd1)](){const _0x3ee2c6=_0x2959fe,_0x585579=this[_0x3ee2c6(0x1be)]?.[_0x3ee2c6(0xde)];if(_0x585579){for await(const _0x86a8bb of _0x585579[_0x3ee2c6(0x18f)])await this[_0x3ee2c6(0x1cc)]({'reply':_0x86a8bb,'changeGroups':_0x86a8bb[_0x3ee2c6(0x154)],'renderingStrategy':_0x3ee2c6(0xbc)});}}[_0x2959fe(0x119)](_0x2817d0){const _0x1816f1=_0x2959fe,_0x4e5335={'positiveCount':_0x2817d0[_0x1816f1(0x154)][_0x1816f1(0x158)](_0x5f44de=>_0x1816f1(0x1f0)===_0x5f44de[_0x1816f1(0x101)])[_0x1816f1(0xc2)],'totalCount':_0x2817d0[_0x1816f1(0x154)][_0x1816f1(0xc2)]},_0x52f1d7=this[_0x1816f1(0x1be)][_0x1816f1(0x129)](_0x2817d0[_0x1816f1(0x1ee)])[_0x1816f1(0xff)];this[_0x1816f1(0xe3)][_0x1816f1(0x1ca)](this[_0x1816f1(0x1be)]['id'],_0x52f1d7,_0x4e5335);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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;}}
23
+ function _0x317f(_0xef0f69,_0x583454){const _0x5db964=_0x5db9();return _0x317f=function(_0x317fc5,_0x2b8f47){_0x317fc5=_0x317fc5-0x116;let _0x5537ce=_0x5db964[_0x317fc5];return _0x5537ce;},_0x317f(_0xef0f69,_0x583454);}const _0x15cfda=_0x317f;function _0x5db9(){const _0x111cca=['AITabs','removeContextItem','updateFeedItemAIReplySuggestionPartState','10uWkdBp','setSelectedModel','updateFeedInteractionHeader','scrollFeedToSuggestion','isTrackChangesOn','isVisible','2713945nILeYS','setModelList','bind','markFeedItemAsDone','destroy','139686cLzPnr','updateSuggestionItem','queueEmptyPromise','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','stopAutoScroll','enqueue','startAutoScroll','_view','populateSourceResourceBalloon','isReasoningEnabled','conversation-start','ai.availableReplyActions','_interactionPromiseResolver','isDone','<p>','addFeedItemAIReply','locale','closeSourceResourceBalloon','updateFeedItemAIReplySources','updateCapabilities','filter','updateFeedItemAIReplyContent','_titleAnimationInterval','requires','value','setFeedItemRenderingStrategy','interaction-header','AIChatUI','capabilities','isBusy','plugins','pluginName','view','removeFeedInteraction','showDiff','isWebSearchEnabled','setModel','clearConversationContextUI','clearPendingContextUI','chatFeed','stopInteraction','setIsUploadInProgress','values','isLoading','displayedPrompt','setReasoning','_promiseQueue','finishInteraction','resetMessageInput','toggleSuggestionDisplayMode','children','setAddContextOptions','5141277FiIwhV','addFeedInteractionHeader','addFeedItemUserMessage','updateWebSources','_animateConversationTitle','isMaximized','isOfficialPlugin','contextItems','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','delegate','disableControls','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','availableModels','322EXUyeM','ai-suggestion-reply','userMessage','chat','areActionsDisabled','61044wpLdtj','updateSuggestionPartState','quickActionData','startInteraction','setWebSearch','AI_CHAT_WELCOME_MESSAGE','label','addItem','chatControls','isPremiumPlugin','updateReplyItem','setConversationTitle','getItemIds','enableModelSelector','resetConversationTitle','6471960aViJsk','ai.chat.models.modelSelectorAlwaysVisible','addFeedItemAISuggestion','trackChanges','setInputPlaceholder','isPending','streaming','ai-reply','options','interactionId','config','feedItemRenderingStrategy','_getLoadingMessage','disableModelSelector','addContextItem','setConversationContext','createConversation','error-message','user-message','find','284790tPcakh','setIsMaximized','startsWith','set','_getInputPlaceholder','setContextItemLoading','updateFeedItemAIReplySuggestionContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','addTab','32GZoUVJ','context','get','1006118YGSnig','commands','showResizeButton','renderingStrategy','scrollToSuggestion','abort','</p>','removeItem','toggleLoadingSkeleton','addFeedItemStaticMessage','markItemAsDone','from','enableControls','isModelAvailable','forEach','setLoadingMessage','then','updateResourceState','length','clear','addFeedItemError','AI_CHAT_HEADING','_isTrackChangesCommandValueBound','chatHeader','focusPromptInput','remove','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','last','isDisabled'];_0x5db9=function(){return _0x111cca;};return _0x5db9();}(function(_0x28727a,_0xa60b2b){const _0x57eab4=_0x317f,_0x5c47eb=_0x28727a();while(!![]){try{const _0x4b6bed=parseInt(_0x57eab4(0x1a6))/0x1+parseInt(_0x57eab4(0x1b2))/0x2+-parseInt(_0x57eab4(0x13a))/0x3*(parseInt(_0x57eab4(0x1af))/0x4)+-parseInt(_0x57eab4(0x135))/0x5+-parseInt(_0x57eab4(0x183))/0x6*(-parseInt(_0x57eab4(0x17e))/0x7)+parseInt(_0x57eab4(0x192))/0x8+-parseInt(_0x57eab4(0x16e))/0x9*(parseInt(_0x57eab4(0x12f))/0xa);if(_0x4b6bed===_0xa60b2b)break;else _0x5c47eb['push'](_0x5c47eb['shift']());}catch(_0x56e4be){_0x5c47eb['push'](_0x5c47eb['shift']());}}}(_0x5db9,0x8d306));import{ContextPlugin as _0x11c542}from'ckeditor5/src/core.js';import{_isMotionReduced as _0xa24e23}from'ckeditor5/src/utils.js';import{AIChatView as _0x22f521}from'./ui/aichatview.js';import{AITabs as _0x450a79}from'../aitabs/aitabs.js';import{getTranslation as _0x32fc48}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x113774}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x195c52}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x3946a5}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x24869b}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x2c484e}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x11c542{static get[_0x15cfda(0x151)](){return[_0x450a79];}[_0x15cfda(0x141)];static get[_0x15cfda(0x159)](){const _0xb031cf=_0x15cfda;return _0xb031cf(0x155);}static get[_0x15cfda(0x174)](){return!0x0;}static get[_0x15cfda(0x18c)](){return!0x0;}[_0x15cfda(0x19d)]=_0x15cfda(0x198);[_0x15cfda(0x15c)]=!0x0;[_0x15cfda(0x168)];[_0x15cfda(0x146)];[_0x15cfda(0x150)]=void 0x0;[_0x15cfda(0x125)]=!0x1;constructor(_0x246291){const _0x49aebd=_0x15cfda;super(_0x246291);const _0x10d043=this[_0x49aebd(0x1b0)][_0x49aebd(0x158)][_0x49aebd(0x1b1)](_0x49aebd(0x12c));this[_0x49aebd(0x1a9)](_0x49aebd(0x157),!0x1),this[_0x49aebd(0x168)]=new _0x3946a5(),this[_0x49aebd(0x141)]=new _0x22f521(this[_0x49aebd(0x1b0)][_0x49aebd(0x14a)],_0x10d043[_0x49aebd(0x1b4)]),this[_0x49aebd(0x141)][_0x49aebd(0x179)](..._0x24869b)['to'](this),this[_0x49aebd(0x141)]['on'](_0x49aebd(0x16b),(_0x4d5374,{showDiff:_0x6602f0})=>{const _0x4d34cf=_0x49aebd;this[_0x4d34cf(0x15c)]=_0x6602f0;}),_0x10d043[_0x49aebd(0x15a)][_0x49aebd(0x1ae)]({'id':_0x49aebd(0x181),'buttonLabel':_0x32fc48(this[_0x49aebd(0x1b0)][_0x49aebd(0x14a)],_0x49aebd(0x124)),'buttonIcon':_0x113774,'order':0x0,'content':this[_0x49aebd(0x141)]}),this[_0x49aebd(0x141)][_0x49aebd(0x18b)][_0x49aebd(0x137)](_0x49aebd(0x165))['to'](this,_0x49aebd(0x157),_0x2be6d8=>_0x2be6d8),this[_0x49aebd(0x141)][_0x49aebd(0x161)][_0x49aebd(0x137)](_0x49aebd(0x197))['to'](this,_0x49aebd(0x157),_0x20335e=>_0x20335e),this[_0x49aebd(0x141)][_0x49aebd(0x18b)][_0x49aebd(0x196)](this[_0x49aebd(0x1aa)]()),this[_0x49aebd(0x137)](_0x49aebd(0x11c))['to'](this[_0x49aebd(0x141)][_0x49aebd(0x18b)],_0x49aebd(0x11c));}[_0x15cfda(0x139)](){const _0x1588da=_0x15cfda;super[_0x1588da(0x139)](),this[_0x1588da(0x150)]&&clearInterval(this[_0x1588da(0x150)]);}[_0x15cfda(0x1a2)](_0xfbda63){const _0x41eab4=_0x15cfda;this[_0x41eab4(0x141)][_0x41eab4(0x161)][_0x41eab4(0x122)](),this[_0x41eab4(0x141)][_0x41eab4(0x18b)][_0x41eab4(0x190)](),this[_0x41eab4(0x141)][_0x41eab4(0x18b)][_0x41eab4(0x136)](_0xfbda63[_0x41eab4(0x17d)],!this[_0x41eab4(0x1b0)][_0x41eab4(0x19c)][_0x41eab4(0x1b1)](_0x41eab4(0x193))),this[_0x41eab4(0x118)]({'id':_0x41eab4(0x144),'staticMessage':_0x32fc48(this[_0x41eab4(0x1b0)][_0x41eab4(0x14a)],_0x41eab4(0x188))});}[_0x15cfda(0x118)]({id:_0x175d82,staticMessage:_0x21ad55}){const _0x272f75=_0x15cfda;this[_0x272f75(0x141)][_0x272f75(0x161)][_0x272f75(0x18a)](_0x272f75(0x199),{'id':_0x175d82,'initialContent':_0x272f75(0x148)+_0x21ad55+_0x272f75(0x1b8)});}[_0x15cfda(0x170)](_0x3893c8){const _0x9b0441=_0x15cfda,_0x2a5a27=_0x3893c8[_0x9b0441(0x185)]?.[_0x9b0441(0x166)]||_0x3893c8[_0x9b0441(0x180)];this[_0x9b0441(0x141)][_0x9b0441(0x161)][_0x9b0441(0x18a)](_0x9b0441(0x1a4),{'contextItems':Array[_0x9b0441(0x11a)](_0x3893c8[_0x9b0441(0x175)][_0x9b0441(0x164)]()),'initialContent':_0x9b0441(0x148)+_0x2a5a27+_0x9b0441(0x1b8),'id':_0x3893c8['id']});}[_0x15cfda(0x123)]({errorMessage:_0x5d80fe,id:_0x1c9591}){const _0x171ee5=_0x15cfda;this[_0x171ee5(0x141)][_0x171ee5(0x161)][_0x171ee5(0x18a)](_0x171ee5(0x1a3),{'initialContent':_0x171ee5(0x148)+_0x5d80fe+_0x171ee5(0x1b8),'id':_0x1c9591});}[_0x15cfda(0x149)](_0x4ca9d3){const _0x131732=_0x15cfda;return this[_0x131732(0x168)][_0x131732(0x13f)](async()=>{const _0x4cf073=_0x131732;this[_0x4cf073(0x141)][_0x4cf073(0x161)][_0x4cf073(0x18a)](_0x4cf073(0x199),{'id':_0x4ca9d3[_0x4cf073(0x19b)]+':'+_0x4ca9d3['id']}),this[_0x4cf073(0x11e)](null);});}async[_0x15cfda(0x194)](_0x8c28b3){const _0x1aa316=_0x15cfda,_0x4d599e=_0x2c484e(this[_0x1aa316(0x1b0)]);if(_0x4d599e){const _0x1b560c=_0x4d599e[_0x1aa316(0x1b3)][_0x1aa316(0x1b1)](_0x1aa316(0x195));_0x1b560c&&!this[_0x1aa316(0x125)]&&(this[_0x1aa316(0x125)]=!0x0,this[_0x1aa316(0x141)][_0x1aa316(0x161)][_0x1aa316(0x137)](_0x1aa316(0x133))['to'](_0x1b560c,_0x1aa316(0x152)));}return this[_0x1aa316(0x168)][_0x1aa316(0x13f)](async()=>{const _0x565e35=_0x1aa316;this[_0x565e35(0x141)][_0x565e35(0x161)][_0x565e35(0x18a)](_0x565e35(0x17f),{'id':_0x8c28b3[_0x565e35(0x19b)]+':'+_0x8c28b3['id'],'areActionsDisabled':_0x8c28b3[_0x565e35(0x182)],'showDiff':this[_0x565e35(0x15c)],'dropdownConfig':this[_0x565e35(0x1b0)][_0x565e35(0x19c)][_0x565e35(0x1b1)](_0x565e35(0x145))}),this[_0x565e35(0x11e)](null);});}[_0x15cfda(0x16f)](_0x4d3e17,_0x3537f6){const _0x14f7e4=_0x15cfda,_0xf8242d=this[_0x14f7e4(0x141)][_0x14f7e4(0x161)][_0x14f7e4(0x16c)][_0x14f7e4(0x12a)];if(_0xf8242d instanceof _0x195c52)return this[_0x14f7e4(0x141)][_0x14f7e4(0x161)][_0x14f7e4(0x16c)][_0x14f7e4(0x128)](_0xf8242d),void this[_0x14f7e4(0x141)][_0x14f7e4(0x161)][_0x14f7e4(0x18a)](_0x14f7e4(0x154),{'id':_0x4d3e17['id'],'capabilities':{'isWebSearchEnabled':_0xf8242d[_0x14f7e4(0x156)][_0x14f7e4(0x15d)]||_0x3537f6[_0x14f7e4(0x15d)],'isReasoningEnabled':_0xf8242d[_0x14f7e4(0x156)][_0x14f7e4(0x143)]||_0x3537f6[_0x14f7e4(0x143)]}});this[_0x14f7e4(0x141)][_0x14f7e4(0x161)][_0x14f7e4(0x18a)](_0x14f7e4(0x154),{'id':_0x4d3e17['id'],'capabilities':_0x3537f6});}[_0x15cfda(0x131)](_0x4a5f3c){const _0x5eb3b2=_0x15cfda,_0x2b861f=this[_0x5eb3b2(0x141)][_0x5eb3b2(0x161)][_0x5eb3b2(0x16c)][_0x5eb3b2(0x1a5)](_0x89edab=>_0x89edab[_0x5eb3b2(0x19a)]['id']==_0x4a5f3c['id']&&_0x89edab instanceof _0x195c52);_0x2b861f&&_0x2b861f[_0x5eb3b2(0x1a9)](_0x5eb3b2(0x134),_0x4a5f3c[_0x5eb3b2(0x134)]);}async[_0x15cfda(0x14f)](_0x3f821e){const _0x261e52=_0x15cfda,_0x3c56de=_0x3f821e[_0x261e52(0x1b5)]||this[_0x261e52(0x19d)];return this[_0x261e52(0x168)][_0x261e52(0x13f)](async _0x8b5679=>{const _0x20af09=_0x261e52;await this[_0x20af09(0x141)][_0x20af09(0x161)][_0x20af09(0x18d)]({..._0x3f821e,'abortSignal':_0x8b5679,'renderingStrategy':_0x3c56de}),_0x3f821e[_0x20af09(0x147)]&&this[_0x20af09(0x138)](_0x3f821e['id']);});}[_0x15cfda(0x14c)](_0x4d3e49,_0x39dbbf){const _0x4c4d40=_0x15cfda;this[_0x4c4d40(0x141)][_0x4c4d40(0x161)][_0x4c4d40(0x171)](_0x4d3e49,_0x39dbbf);}async[_0x15cfda(0x1ac)](_0xc0d0c2){const _0x105058=_0x15cfda,_0x53f90c=_0xc0d0c2[_0x105058(0x1b5)]||this[_0x105058(0x19d)];return this[_0x105058(0x168)][_0x105058(0x13f)](async _0x555da3=>{const _0x3d88e1=_0x105058;await this[_0x3d88e1(0x141)][_0x3d88e1(0x161)][_0x3d88e1(0x13b)]({..._0xc0d0c2,'abortSignal':_0x555da3,'renderingStrategy':_0x53f90c}),_0xc0d0c2[_0x3d88e1(0x147)]&&this[_0x3d88e1(0x138)](_0xc0d0c2['id']);});}[_0x15cfda(0x12e)](_0x51bc06){const _0x1103ea=_0x15cfda;this[_0x1103ea(0x141)][_0x1103ea(0x161)][_0x1103ea(0x184)](_0x51bc06);}[_0x15cfda(0x138)](_0x5dcd41){const _0xd148a9=_0x15cfda;this[_0xd148a9(0x141)][_0xd148a9(0x161)][_0xd148a9(0x119)](_0x5dcd41);}[_0x15cfda(0x15b)](_0x11867f){const _0x180523=_0x15cfda;this[_0x180523(0x141)][_0x180523(0x161)][_0x180523(0x18f)]()[_0x180523(0x14e)](_0x2839ee=>_0x2839ee[_0x180523(0x1a8)](_0x11867f))[_0x180523(0x11d)](_0x21a0d7=>this[_0x180523(0x141)][_0x180523(0x161)][_0x180523(0x116)](_0x21a0d7));}[_0x15cfda(0x186)](){const _0x2b247b=_0x15cfda;this[_0x2b247b(0x11e)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x2b247b(0x141)][_0x2b247b(0x18b)][_0x2b247b(0x19f)](!this[_0x2b247b(0x1b0)][_0x2b247b(0x19c)][_0x2b247b(0x1b1)](_0x2b247b(0x193))),this[_0x2b247b(0x157)]=!0x0,this[_0x2b247b(0x141)][_0x2b247b(0x161)][_0x2b247b(0x140)]();}[_0x15cfda(0x162)](_0x44925f){const _0x3041c6=_0x15cfda;this[_0x3041c6(0x168)][_0x3041c6(0x1b7)](),this[_0x3041c6(0x141)][_0x3041c6(0x161)][_0x3041c6(0x18f)]()[_0x3041c6(0x14e)](_0x48c56b=>_0x48c56b[_0x3041c6(0x1a8)](_0x44925f['id']))[_0x3041c6(0x11d)](_0x26f09d=>this[_0x3041c6(0x138)](_0x26f09d)),this[_0x3041c6(0x157)]=!0x1,this[_0x3041c6(0x141)][_0x3041c6(0x161)][_0x3041c6(0x13e)]();}async[_0x15cfda(0x169)](){const _0x41aa6e=_0x15cfda;return this[_0x41aa6e(0x168)][_0x41aa6e(0x13c)][_0x41aa6e(0x11f)](()=>{const _0x18c69e=_0x41aa6e;this[_0x18c69e(0x157)]=!0x1,this[_0x18c69e(0x141)][_0x18c69e(0x161)][_0x18c69e(0x13e)]();});}[_0x15cfda(0x1a0)](_0x2a84a7,_0x3ae6f8){const _0x34cfb6=_0x15cfda;this[_0x34cfb6(0x141)][_0x34cfb6(0x18b)][_0x34cfb6(0x1a0)](_0x2a84a7,_0x3ae6f8);}[_0x15cfda(0x12d)](_0xa521df){const _0x10d557=_0x15cfda;this[_0x10d557(0x141)][_0x10d557(0x18b)][_0x10d557(0x12d)](_0xa521df);}[_0x15cfda(0x1ab)](_0x207ee2,_0xf3d987){const _0x4ed670=_0x15cfda;this[_0x4ed670(0x141)][_0x4ed670(0x18b)][_0x4ed670(0x1ab)](_0x207ee2,_0xf3d987);}[_0x15cfda(0x163)](_0x4e738c){const _0x43b2c0=_0x15cfda;this[_0x43b2c0(0x141)][_0x43b2c0(0x18b)][_0x43b2c0(0x163)](_0x4e738c);}[_0x15cfda(0x1a1)](_0x3f23d4){const _0x58624d=_0x15cfda;this[_0x58624d(0x141)][_0x58624d(0x18b)][_0x58624d(0x1a1)](_0x3f23d4);}[_0x15cfda(0x160)](){const _0x44d10a=_0x15cfda;this[_0x44d10a(0x141)][_0x44d10a(0x18b)][_0x44d10a(0x160)]();}[_0x15cfda(0x15f)](){const _0x52db84=_0x15cfda;this[_0x52db84(0x141)][_0x52db84(0x18b)][_0x52db84(0x15f)]();}[_0x15cfda(0x120)](_0x4615ad,_0x402c6e,_0x43812b){const _0x42ba52=_0x15cfda;this[_0x42ba52(0x141)][_0x42ba52(0x18b)][_0x42ba52(0x120)](_0x4615ad,_0x402c6e,_0x43812b);}[_0x15cfda(0x16a)](){const _0x1729ae=_0x15cfda;this[_0x1729ae(0x141)][_0x1729ae(0x18b)][_0x1729ae(0x16a)](),this[_0x1729ae(0x141)][_0x1729ae(0x18b)][_0x1729ae(0x196)](this[_0x1729ae(0x1aa)]());}[_0x15cfda(0x16d)](_0x276ea0){const _0x341b26=_0x15cfda;this[_0x341b26(0x141)][_0x341b26(0x18b)][_0x341b26(0x16d)](_0x276ea0);}[_0x15cfda(0x14d)](_0x36397c){const _0x2fde9a=_0x15cfda;this[_0x2fde9a(0x141)][_0x2fde9a(0x18b)][_0x2fde9a(0x187)](_0x36397c[_0x2fde9a(0x15d)]),this[_0x2fde9a(0x141)][_0x2fde9a(0x18b)][_0x2fde9a(0x167)](_0x36397c[_0x2fde9a(0x143)]),this[_0x2fde9a(0x141)][_0x2fde9a(0x18b)][_0x2fde9a(0x196)](this[_0x2fde9a(0x1aa)](_0x36397c));}[_0x15cfda(0x130)](_0x2ab94f,_0x235410){const _0x2b791e=_0x15cfda;this[_0x2b791e(0x141)][_0x2b791e(0x18b)][_0x2b791e(0x15e)](_0x2ab94f),_0x235410&&this[_0x2b791e(0x141)][_0x2b791e(0x18b)][_0x2b791e(0x19f)](!0x1);}[_0x15cfda(0x153)](_0x31405e){const _0x436529=_0x15cfda;this[_0x436529(0x19d)]=_0x31405e;}[_0x15cfda(0x117)](_0x127464){const _0x48e618=_0x15cfda;this[_0x48e618(0x141)][_0x48e618(0x161)][_0x48e618(0x117)](_0x127464);}[_0x15cfda(0x191)](){const _0x5a7709=_0x15cfda;this[_0x5a7709(0x18e)](_0x32fc48(this[_0x5a7709(0x1b0)][_0x5a7709(0x14a)],_0x5a7709(0x124)));}[_0x15cfda(0x18e)](_0x68fcc2,_0x14f8ba=!0x1){const _0x347d61=_0x15cfda;if(_0x14f8ba&&!_0xa24e23()&&_0x68fcc2[_0x347d61(0x121)])return this[_0x347d61(0x141)][_0x347d61(0x126)][_0x347d61(0x189)]='',void this[_0x347d61(0x172)](_0x68fcc2);this[_0x347d61(0x141)][_0x347d61(0x126)][_0x347d61(0x189)]=_0x68fcc2;}[_0x15cfda(0x11e)](_0x1d44fb){const _0x306b32=_0x15cfda,_0x19bd25=this[_0x306b32(0x19e)](_0x1d44fb);this[_0x306b32(0x141)][_0x306b32(0x161)][_0x306b32(0x11e)](_0x19bd25);}[_0x15cfda(0x172)](_0x4ce9ff){const _0x1e90ac=_0x15cfda;let _0x247126=0x0;clearInterval(this[_0x1e90ac(0x150)]),this[_0x1e90ac(0x150)]=setInterval(()=>{const _0x4e4e11=_0x1e90ac;this[_0x4e4e11(0x141)][_0x4e4e11(0x126)][_0x4e4e11(0x189)]=this[_0x4e4e11(0x141)][_0x4e4e11(0x126)][_0x4e4e11(0x189)]+_0x4ce9ff[_0x247126],_0x247126++,_0x247126===_0x4ce9ff[_0x4e4e11(0x121)]&&clearInterval(this[_0x4e4e11(0x150)]);},0x1e);}[_0x15cfda(0x1a7)](_0x53f318){const _0x1d73b7=_0x15cfda;this[_0x1d73b7(0x141)][_0x1d73b7(0x126)][_0x1d73b7(0x173)]=_0x53f318;}[_0x15cfda(0x19e)](_0x585702){const _0x1b292a=_0x15cfda;return _0x585702?_0x585702[_0x1b292a(0x15d)]&&_0x585702[_0x1b292a(0x143)]?_0x32fc48(this[_0x1b292a(0x1b0)][_0x1b292a(0x14a)],_0x1b292a(0x1ad)):_0x585702[_0x1b292a(0x15d)]?_0x32fc48(this[_0x1b292a(0x1b0)][_0x1b292a(0x14a)],_0x1b292a(0x129)):_0x585702[_0x1b292a(0x143)]?_0x32fc48(this[_0x1b292a(0x1b0)][_0x1b292a(0x14a)],_0x1b292a(0x17b)):_0x32fc48(this[_0x1b292a(0x1b0)][_0x1b292a(0x14a)],_0x1b292a(0x178)):'';}[_0x15cfda(0x1aa)](_0x3eba0f){const _0x2cb4e1=_0x15cfda;return _0x3eba0f?_0x3eba0f[_0x2cb4e1(0x15d)]&&_0x3eba0f[_0x2cb4e1(0x143)]?_0x32fc48(this[_0x2cb4e1(0x1b0)][_0x2cb4e1(0x14a)],_0x2cb4e1(0x17c)):_0x3eba0f[_0x2cb4e1(0x15d)]?_0x32fc48(this[_0x2cb4e1(0x1b0)][_0x2cb4e1(0x14a)],_0x2cb4e1(0x177)):_0x3eba0f[_0x2cb4e1(0x143)]?_0x32fc48(this[_0x2cb4e1(0x1b0)][_0x2cb4e1(0x14a)],_0x2cb4e1(0x13d)):_0x32fc48(this[_0x2cb4e1(0x1b0)][_0x2cb4e1(0x14a)],_0x2cb4e1(0x176)):_0x32fc48(this[_0x2cb4e1(0x1b0)][_0x2cb4e1(0x14a)],_0x2cb4e1(0x176));}[_0x15cfda(0x142)](_0x4c7ebe,_0x50b580,_0x21f494,_0x5e7102){const _0x2c6fc7=_0x15cfda;this[_0x2c6fc7(0x141)][_0x2c6fc7(0x142)](_0x4c7ebe,_0x50b580,_0x21f494,_0x5e7102);}[_0x15cfda(0x14b)](_0x5cef41){const _0x2a2f10=_0x15cfda;this[_0x2a2f10(0x141)][_0x2a2f10(0x14b)](_0x5cef41);}[_0x15cfda(0x127)](){const _0x28380e=_0x15cfda;this[_0x28380e(0x141)][_0x28380e(0x18b)][_0x28380e(0x127)]();}[_0x15cfda(0x132)](_0x4474b5,_0x4400d1){const _0x2e0175=_0x15cfda;this[_0x2e0175(0x141)][_0x2e0175(0x161)][_0x2e0175(0x1b6)](_0x4474b5,_0x4400d1);}[_0x15cfda(0x17a)](){const _0x1c47c2=_0x15cfda;this[_0x1c47c2(0x141)][_0x1c47c2(0x18b)][_0x1c47c2(0x12b)]=!0x0;}[_0x15cfda(0x11b)](){const _0x361703=_0x15cfda;this[_0x361703(0x141)][_0x361703(0x18b)][_0x361703(0x12b)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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});}}
23
+ const _0x1b8728=_0x4c05;(function(_0x1520cc,_0x1634df){const _0x3229c2=_0x4c05,_0x461b20=_0x1520cc();while(!![]){try{const _0x495839=-parseInt(_0x3229c2(0x17a))/0x1*(-parseInt(_0x3229c2(0x16f))/0x2)+-parseInt(_0x3229c2(0x171))/0x3*(-parseInt(_0x3229c2(0x125))/0x4)+parseInt(_0x3229c2(0x12c))/0x5+parseInt(_0x3229c2(0x15f))/0x6*(parseInt(_0x3229c2(0x139))/0x7)+parseInt(_0x3229c2(0x147))/0x8+parseInt(_0x3229c2(0x1a4))/0x9*(parseInt(_0x3229c2(0x178))/0xa)+-parseInt(_0x3229c2(0x143))/0xb*(parseInt(_0x3229c2(0x154))/0xc);if(_0x495839===_0x1634df)break;else _0x461b20['push'](_0x461b20['shift']());}catch(_0xaf8eff){_0x461b20['push'](_0x461b20['shift']());}}}(_0x20bc,0xad9a7));import{CKEditorError as _0xbb59fd,ObservableMixin as _0x22106e,uid as _0x4791d7}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x39495c,AIContextTextResourceType as _0x2ec68a}from'../../aicore/model/aicontext.js';function _0x4c05(_0x5b26f2,_0x33b652){const _0x20bc90=_0x20bc();return _0x4c05=function(_0x4c0586,_0x12de5f){_0x4c0586=_0x4c0586-0x11c;let _0x2b0d82=_0x20bc90[_0x4c0586];return _0x2b0d82;},_0x4c05(_0x5b26f2,_0x33b652);}import{escape as _0x4554ef}from'es-toolkit/compat';function _0x20bc(){const _0x15fc53=['_toggleAddCurrentDocumentOptionVisibility','_ownerId','SELECTION','4776324ZBSACa','data','isInContext','values','abort','TEXT','stack','resourceStateChanged','mapContextItemsToRequestData','sources','1499003mPmccu','find','from','_createContextItemFromContent','11095024VHhmch','set','init','getId','uploadProgressChanged','addResourceToContext','enabled','_startUploadOperation','size','_finishUploadOperation','_convertTextResourceToFile','sessionId','label','444GYfmdP','attributes','_addContextOptionsState','getDocument','ai-chat-resource-no-data','_addContextItem','isCurrentDocumentInContext','push','message','text/html','_addToConversationContextItem','6zMevxS','FILE','isHidden','all','current-document','_updateResourceInContextState','object\x20with\x20content\x20and\x20type\x20properties','ai-request-aborted','abortController','text/plain','selection','error','addContextOptionsChanged','url-','forEach','uploadUrl','26PCskyy','uploadFile','4809iktGwX','URL','name','_isResourceInContext','files','urls','contextItemRemoved','10nqzRGy','contextSent','52471JDdJrg','_findSourceIdsByResourceId','contextItemAdded','_config','MARKDOWN','_removeContextItem','removeFromContext','object','resources','File','isReadOnly','ai-chat-resource-load-failed','url','uploadDocument','sourceResourcesLoaded','length','isCurrentDocumentInConversation','ai-chat-file-upload-failed','uiId','get','loadSourceResources','has','removeSelectionFromContext','_conversationContextItems','getSentContextItems','filter','_pendingContextItems','_setAddContextOptionsDefaultState','addFilesToContext','ai-chat-source-resources-load-failed','contextItemLoadingEnded','Current\x20document','files-','_connector','version','getResources','resourceId','ai-chat-url-upload-failed','getData','clearPendingContextItems','DOCUMENT','document','5496669JFoBgh','fetchDocument','_ongoingUploads','file-','ai-chat-source-not-found','isSelectionInContext','delete','_finishContextItemLoading','_getCustomSourcesInitialState','addSelectionToContext','addCurrentDocumentToContext','hidden','ai-chat-context-invalid-data','string','_ongoingUploadOperations','populateFromMessage','end','2644EebzFe','addToConversationContext','getPendingContextItems','updateCurrentDocument','map','startsWith','type','6657615YhdJPI','content','addUrlToContext','ai-chat-context-unsupported-type','ai-chat-document-upload-failed','fire','_mapContextItemToRequestData','text/markdown','HTML','start'];_0x20bc=function(){return _0x15fc53;};return _0x20bc();}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x1b8728(0x17c),_0x1b8728(0x177),_0x1b8728(0x198),_0x1b8728(0x179),_0x1b8728(0x16a),_0x1b8728(0x16b),_0x1b8728(0x188),_0x1b8728(0x140),_0x1b8728(0x14b)];export class AIChatContext extends _0x22106e(){[_0x1b8728(0x19b)];[_0x1b8728(0x17d)];[_0x1b8728(0x137)];constructor({connector:_0x21ac7e,config:_0x65a409,ownerId:_0x363ac6}){const _0x20b2b2=_0x1b8728;super(),this[_0x20b2b2(0x19b)]=_0x21ac7e,this[_0x20b2b2(0x17d)]=_0x65a409,this[_0x20b2b2(0x137)]=_0x363ac6;}[_0x1b8728(0x149)](){const _0x27149e=_0x1b8728;this[_0x27149e(0x194)]=new Map(),this[_0x27149e(0x191)]=new Map(),this[_0x27149e(0x1a6)]=new Map(),this[_0x27149e(0x122)]=new Map(),this[_0x27149e(0x195)]();}[_0x1b8728(0x127)](){const _0x372e11=_0x1b8728;return this[_0x372e11(0x194)];}async[_0x1b8728(0x123)](_0x5b01ff){const _0x452922=_0x1b8728,_0xcfe53d=await this[_0x452922(0x146)](_0x5b01ff);return this[_0x452922(0x15e)](_0xcfe53d),_0x452922(0x163)===_0xcfe53d[_0x452922(0x18c)]&&this[_0x452922(0x136)](),_0xcfe53d;}async[_0x1b8728(0x146)](_0x497c9f){const _0x52b6d6=_0x1b8728;if(_0x497c9f[_0x52b6d6(0x12b)]===_0x39495c[_0x52b6d6(0x1a2)]){const _0x59c0db=await this[_0x52b6d6(0x19b)][_0x52b6d6(0x1a5)](this[_0x52b6d6(0x137)],_0x497c9f['id'])[_0x52b6d6(0x157)]();return{'id':_0x52b6d6(0x163),'uiId':_0x52b6d6(0x163),'label':_0x52b6d6(0x199),'type':_0x497c9f[_0x52b6d6(0x12b)],'content':_0x59c0db[_0x52b6d6(0x12d)],'hidden':this[_0x52b6d6(0x191)][_0x52b6d6(0x18f)](_0x52b6d6(0x163)),'version':_0x59c0db[_0x52b6d6(0x155)]?.[_0x52b6d6(0x19c)],'sessionId':_0x59c0db[_0x52b6d6(0x155)]?.[_0x52b6d6(0x152)]};}return{'id':_0x497c9f['id'],'uiId':_0x497c9f['id'],'label':_0x497c9f[_0x52b6d6(0x155)]?.[_0x52b6d6(0x153)]||_0x497c9f[_0x52b6d6(0x173)]||_0x497c9f[_0x52b6d6(0x186)]||_0x497c9f['id'],'type':_0x497c9f[_0x52b6d6(0x12b)],..._0x497c9f?.[_0x52b6d6(0x155)]?.[_0x52b6d6(0x19e)]?{'resourceId':_0x497c9f[_0x52b6d6(0x155)]?.[_0x52b6d6(0x19e)]}:{}};}[_0x1b8728(0x192)](){const _0x38af96=_0x1b8728;return new Map(this[_0x38af96(0x191)]);}[_0x1b8728(0x180)](_0x4444e0){const _0x1c7b50=_0x1b8728,_0x147dc1=this[_0x1c7b50(0x194)][_0x1c7b50(0x18d)](_0x4444e0);_0x147dc1?.[_0x1c7b50(0x184)]||this[_0x1c7b50(0x17f)](_0x4444e0);}[_0x1b8728(0x1a1)](){const _0x22a40e=_0x1b8728;if(0x0===this[_0x22a40e(0x194)][_0x22a40e(0x14f)])return;for(const _0x37347a of this[_0x22a40e(0x194)][_0x22a40e(0x13c)]())this[_0x22a40e(0x17f)](_0x37347a[_0x22a40e(0x18c)]);const _0xf090d0=this[_0x22a40e(0x191)][_0x22a40e(0x18d)](_0x22a40e(0x163))||this[_0x22a40e(0x194)][_0x22a40e(0x18d)](_0x22a40e(0x163));_0xf090d0&&this[_0x22a40e(0x159)]({..._0xf090d0,'isReadOnly':!0x0,'hidden':!0x0});}[_0x1b8728(0x126)](_0xada9b5){const _0x391174=_0x1b8728;for(const _0x1ed949 of _0xada9b5[_0x391174(0x13c)]())this[_0x391174(0x15e)](_0x1ed949);this[_0x391174(0x1a1)](),this[_0x391174(0x131)](_0x391174(0x179),{'contextItems':Array[_0x391174(0x145)](this[_0x391174(0x192)]()[_0x391174(0x13c)]())});}[_0x1b8728(0x15a)](){const _0x13ebab=_0x1b8728;return this[_0x13ebab(0x194)][_0x13ebab(0x18f)](_0x13ebab(0x163));}[_0x1b8728(0x1a9)](){const _0x3bd714=_0x1b8728;return this[_0x3bd714(0x194)][_0x3bd714(0x18f)](_0x3bd714(0x169));}[_0x1b8728(0x18a)](){const _0x42cb64=_0x1b8728;return this[_0x42cb64(0x191)][_0x42cb64(0x18f)](_0x42cb64(0x163));}static[_0x1b8728(0x141)](_0x2f7f97){const _0x3a56d7=_0x1b8728;return Array[_0x3a56d7(0x145)](_0x2f7f97[_0x3a56d7(0x13c)]())[_0x3a56d7(0x129)](_0x17c79e=>this[_0x3a56d7(0x132)](_0x17c79e))[_0x3a56d7(0x193)](_0xf3b229=>null!==_0xf3b229);}async[_0x1b8728(0x196)](_0x1ca516,_0x37bae9,_0x3866e4=_0x39495c[_0x1b8728(0x160)]){const _0x45ee5c=_0x1b8728,_0x484ec4=_0x45ee5c(0x19a)+_0x4791d7();this[_0x45ee5c(0x14e)](_0x484ec4);try{await Promise[_0x45ee5c(0x162)](_0x1ca516[_0x45ee5c(0x129)](async _0x215d90=>{const _0x5c77b4=_0x45ee5c,_0x5e97e6=_0x5c77b4(0x1a7)+_0x4791d7(),_0x2a0e11=_0x4554ef(_0x215d90[_0x5c77b4(0x173)]);try{this[_0x5c77b4(0x159)]({'type':_0x3866e4,'label':_0x37bae9?.[_0x5c77b4(0x153)]||_0x2a0e11,'uiId':_0x5e97e6,'resourceId':_0x37bae9?.[_0x5c77b4(0x19e)]},!0x0);const _0x3d2cf8=this[_0x5c77b4(0x19b)][_0x5c77b4(0x170)](this[_0x5c77b4(0x137)],_0x215d90,_0x37bae9);this[_0x5c77b4(0x1a6)][_0x5c77b4(0x148)](_0x5e97e6,_0x3d2cf8[_0x5c77b4(0x167)]);const {id:_0x2020b7}=await _0x3d2cf8[_0x5c77b4(0x14a)]();this[_0x5c77b4(0x1a6)][_0x5c77b4(0x1aa)](_0x5e97e6),this[_0x5c77b4(0x1ab)]({'type':_0x3866e4,'id':_0x2020b7,'label':_0x37bae9?.[_0x5c77b4(0x153)]||_0x2a0e11,'uiId':_0x5e97e6,'resourceId':_0x37bae9?.[_0x5c77b4(0x19e)]},!0x1);}catch(_0x5b86f8){this[_0x5c77b4(0x1a6)][_0x5c77b4(0x1aa)](_0x5e97e6);if(!_0x5b86f8[_0x5c77b4(0x15c)][_0x5c77b4(0x12a)](_0x5c77b4(0x166))){const _0x52874a=new _0xbb59fd(_0x5c77b4(0x18b),null,{'fileName':_0x2a0e11});_0x52874a[_0x5c77b4(0x13f)]=_0x5b86f8[_0x5c77b4(0x13f)],this[_0x5c77b4(0x131)](_0x5c77b4(0x16a),{'error':_0x52874a,'fileName':_0x2a0e11});}this[_0x5c77b4(0x17f)](_0x5e97e6);}}));}finally{this[_0x45ee5c(0x150)](_0x484ec4);}}[_0x1b8728(0x11e)](_0x14121b){const _0x380d8e=_0x1b8728;if(this[_0x380d8e(0x15a)]())return;const _0xcc512f={'type':_0x39495c[_0x380d8e(0x1a2)],'uiId':_0x380d8e(0x163),'label':_0x14121b,'isReadOnly':this[_0x380d8e(0x191)][_0x380d8e(0x18f)](_0x380d8e(0x163)),'hidden':this[_0x380d8e(0x191)][_0x380d8e(0x18f)](_0x380d8e(0x163))};this[_0x380d8e(0x159)](_0xcc512f);}async[_0x1b8728(0x128)](_0x441cb9,_0x52b9ed,_0x12dedc,_0x5d4bca){const _0x4471a1=_0x1b8728,_0x1733ae=this[_0x4471a1(0x194)][_0x4471a1(0x18d)](_0x4471a1(0x163));if(_0x1733ae&&_0x441cb9){_0x1733ae[_0x4471a1(0x169)]=_0x5d4bca?_0x5d4bca[_0x4471a1(0x129)](_0xa2634b=>({'start':_0xa2634b[_0x4471a1(0x135)],'end':_0xa2634b[_0x4471a1(0x124)]})):[];try{if(_0x1733ae[_0x4471a1(0x19c)]===_0x52b9ed)return;const {id:_0x52e179}=await this[_0x4471a1(0x19b)][_0x4471a1(0x187)](this[_0x4471a1(0x137)],_0x441cb9,{'version':_0x52b9ed,'sessionId':_0x12dedc})[_0x4471a1(0x14a)]();_0x1733ae['id']=_0x52e179,_0x1733ae[_0x4471a1(0x12d)]=_0x441cb9,_0x1733ae[_0x4471a1(0x19c)]=_0x52b9ed,_0x1733ae[_0x4471a1(0x152)]=_0x12dedc;}catch(_0x3436c1){const _0x7f29ee=new _0xbb59fd(_0x4471a1(0x130),null);_0x7f29ee[_0x4471a1(0x13f)]=_0x3436c1[_0x4471a1(0x13f)],this[_0x4471a1(0x131)](_0x4471a1(0x16a),{'error':_0x7f29ee});}}}[_0x1b8728(0x11d)](_0x1bb30f){const _0x189976=_0x1b8728;this[_0x189976(0x159)]({'type':_0x39495c[_0x189976(0x138)],'label':_0x1bb30f,'uiId':_0x189976(0x169),'content':_0x1bb30f});}[_0x1b8728(0x190)](){const _0xc63a50=_0x1b8728;this[_0xc63a50(0x17f)](_0xc63a50(0x169));}async[_0x1b8728(0x12e)](_0x3ea734,_0x1b9bd5){const _0x277b63=_0x1b8728,_0xd43644=_0x277b63(0x16c)+_0x4791d7();this[_0x277b63(0x14e)](_0xd43644);const _0x1e7155=_0x277b63(0x16c)+_0x4791d7();try{this[_0x277b63(0x159)]({'type':_0x39495c[_0x277b63(0x172)],'label':_0x1b9bd5?.[_0x277b63(0x153)]||_0x3ea734,'uiId':_0x1e7155,'resourceId':_0x1b9bd5?.[_0x277b63(0x19e)]},!0x0);const _0x37191d=this[_0x277b63(0x19b)][_0x277b63(0x16e)](this[_0x277b63(0x137)],_0x3ea734,_0x1b9bd5);this[_0x277b63(0x1a6)][_0x277b63(0x148)](_0x1e7155,_0x37191d[_0x277b63(0x167)]);const {id:_0x50b68c}=await _0x37191d[_0x277b63(0x14a)]();this[_0x277b63(0x1a6)][_0x277b63(0x1aa)](_0x1e7155),this[_0x277b63(0x1ab)]({'type':_0x39495c[_0x277b63(0x172)],'id':_0x50b68c,'label':_0x1b9bd5?.[_0x277b63(0x153)]||_0x3ea734,'uiId':_0x1e7155,'resourceId':_0x1b9bd5?.[_0x277b63(0x19e)]},!0x1);}catch(_0x560f37){this[_0x277b63(0x1a6)][_0x277b63(0x1aa)](_0x1e7155),(_0x560f37[_0x277b63(0x15c)][_0x277b63(0x12a)](_0x277b63(0x166))||this[_0x277b63(0x131)](_0x277b63(0x16a),{'error':new _0xbb59fd(_0x277b63(0x19f),this,{'url':_0x3ea734,'originalError':_0x560f37}),'url':_0x3ea734}),this[_0x277b63(0x17f)](_0x1e7155));}finally{this[_0x277b63(0x150)](_0xd43644);}}async[_0x1b8728(0x18e)](_0x3ebc54,_0x434d57,_0x32331e){const _0x1841e5=_0x1b8728,_0x248a17=this[_0x1841e5(0x156)][_0x1841e5(0x142)][_0x1841e5(0x144)](_0x47d092=>_0x47d092['id']===_0x3ebc54);if(!_0x248a17)return this[_0x1841e5(0x131)](_0x1841e5(0x16a),{'error':new _0xbb59fd(_0x1841e5(0x1a8),this,{'sourceId':_0x3ebc54}),'sourceId':_0x3ebc54}),[];try{const _0x5be2a8=(await _0x248a17[_0x1841e5(0x19d)](_0x434d57))[_0x1841e5(0x129)](_0x5958a6=>{const _0x53823f=_0x1841e5,_0x5e5780=this[_0x53823f(0x174)](_0x5958a6['id']);return{..._0x5958a6,'isInContext':_0x5e5780};});return _0x248a17[_0x1841e5(0x182)]=_0x5be2a8,this[_0x1841e5(0x131)](_0x1841e5(0x188),{'sourceId':_0x3ebc54,'source':_0x248a17,'resources':_0x5be2a8,'uid':_0x32331e}),_0x5be2a8;}catch(_0x1cb50c){return this[_0x1841e5(0x131)](_0x1841e5(0x16a),{'error':new _0xbb59fd(_0x1841e5(0x197),this,{'sourceId':_0x3ebc54,'originalError':_0x1cb50c}),'sourceId':_0x3ebc54,'sourceLabel':_0x248a17[_0x1841e5(0x153)]}),[];}}async[_0x1b8728(0x14c)](_0x536a48,_0x18abf0){const _0x39182d=_0x1b8728;if(this[_0x39182d(0x174)](_0x18abf0['id']))return;let _0x4ab72b=_0x18abf0[_0x39182d(0x13a)];if(!_0x4ab72b&&_0x536a48[_0x39182d(0x1a0)])try{_0x4ab72b=await _0x536a48[_0x39182d(0x1a0)](_0x18abf0['id']);}catch(_0x25a480){return void this[_0x39182d(0x131)](_0x39182d(0x16a),{'error':new _0xbb59fd(_0x39182d(0x185),this,{'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id'],'originalError':_0x25a480}),'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']});}if(_0x4ab72b)switch(_0x18abf0[_0x39182d(0x12b)]){case _0x39495c[_0x39182d(0x172)]:if(_0x39182d(0x121)!=typeof _0x4ab72b)return void this[_0x39182d(0x131)](_0x39182d(0x16a),{'error':new _0xbb59fd(_0x39182d(0x120),this,{'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id'],'expectedType':_0x39182d(0x121),'actualType':typeof _0x4ab72b}),'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']});await this[_0x39182d(0x12e)](_0x4ab72b,{'label':_0x18abf0[_0x39182d(0x153)],'resourceId':_0x18abf0['id']});break;case _0x39495c[_0x39182d(0x160)]:if(!(_0x4ab72b instanceof File))return void this[_0x39182d(0x131)](_0x39182d(0x16a),{'error':new _0xbb59fd(_0x39182d(0x120),this,{'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id'],'expectedType':_0x39182d(0x183),'actualType':typeof _0x4ab72b}),'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']});await this[_0x39182d(0x196)]([_0x4ab72b],{'label':_0x18abf0[_0x39182d(0x153)],'resourceId':_0x18abf0['id']});break;case _0x39495c[_0x39182d(0x13e)]:if(_0x39182d(0x181)!=typeof _0x4ab72b||!(_0x39182d(0x12d)in _0x4ab72b)||!(_0x39182d(0x12b)in _0x4ab72b))return void this[_0x39182d(0x131)](_0x39182d(0x16a),{'error':new _0xbb59fd(_0x39182d(0x120),this,{'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id'],'expectedType':_0x39182d(0x165),'actualType':typeof _0x4ab72b}),'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']});_0x4ab72b=AIChatContext[_0x39182d(0x151)](_0x4ab72b,_0x18abf0[_0x39182d(0x153)]),await this[_0x39182d(0x196)]([_0x4ab72b],{'label':_0x18abf0[_0x39182d(0x153)],'resourceId':_0x18abf0['id']},_0x39495c[_0x39182d(0x13e)]);break;default:this[_0x39182d(0x131)](_0x39182d(0x16a),{'error':new _0xbb59fd(_0x39182d(0x12f),this,{'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id'],'resourceType':_0x18abf0[_0x39182d(0x12b)]}),'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']});}else this[_0x39182d(0x131)](_0x39182d(0x16a),{'error':new _0xbb59fd(_0x39182d(0x158),this,{'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']}),'resourceId':_0x18abf0['id'],'sourceId':_0x536a48['id']});}static[_0x1b8728(0x151)](_0xe24c99,_0x41f63d){const _0xe3a6=_0x1b8728;switch(_0xe24c99[_0xe3a6(0x12b)]){case _0x2ec68a[_0xe3a6(0x17e)]:return new File([_0xe24c99[_0xe3a6(0x12d)]],_0x41f63d,{'type':_0xe3a6(0x133)});case _0x2ec68a[_0xe3a6(0x134)]:return new File([_0xe24c99[_0xe3a6(0x12d)]],_0x41f63d,{'type':_0xe3a6(0x15d)});default:return new File([_0xe24c99[_0xe3a6(0x12d)]],_0x41f63d,{'type':_0xe3a6(0x168)});}}static[_0x1b8728(0x132)](_0x5043f4){const _0x3bc9eb=_0x1b8728;switch(_0x5043f4[_0x3bc9eb(0x12b)]){case _0x39495c[_0x3bc9eb(0x160)]:return{'type':_0x39495c[_0x3bc9eb(0x160)],'id':_0x5043f4['id']};case _0x39495c[_0x3bc9eb(0x172)]:return{'type':_0x39495c[_0x3bc9eb(0x172)],'id':_0x5043f4['id']};case _0x39495c[_0x3bc9eb(0x1a2)]:return{'type':_0x39495c[_0x3bc9eb(0x1a2)],'id':_0x5043f4['id'],..._0x5043f4[_0x3bc9eb(0x169)]?.[_0x3bc9eb(0x189)]&&{'selection':_0x5043f4[_0x3bc9eb(0x169)]}};case _0x39495c[_0x3bc9eb(0x13e)]:return{'type':_0x39495c[_0x3bc9eb(0x160)],'id':_0x5043f4['id']};default:return null;}}[_0x1b8728(0x159)](_0x556725,_0x14ff3b=!0x1){const _0x33da4a=_0x1b8728;if(this[_0x33da4a(0x194)][_0x33da4a(0x148)](_0x556725[_0x33da4a(0x18c)],_0x556725),_0x556725[_0x33da4a(0x11f)]||this[_0x33da4a(0x131)](_0x33da4a(0x17c),{'contextItem':_0x556725,'isLoading':_0x14ff3b}),_0x33da4a(0x163)===_0x556725[_0x33da4a(0x18c)]&&this[_0x33da4a(0x136)](),_0x556725[_0x33da4a(0x19e)]){const _0x28c7ad=this[_0x33da4a(0x17b)](_0x556725[_0x33da4a(0x19e)]);_0x28c7ad&&_0x28c7ad[_0x33da4a(0x16d)](_0x9a2bdd=>{const _0x39fadf=_0x33da4a;this[_0x39fadf(0x164)](_0x9a2bdd,_0x556725[_0x39fadf(0x19e)],!0x0);});}}[_0x1b8728(0x17f)](_0x21484d){const _0x237e5d=_0x1b8728,_0x10431f=this[_0x237e5d(0x194)][_0x237e5d(0x18d)](_0x21484d),_0x59ae77=this[_0x237e5d(0x1a6)][_0x237e5d(0x18d)](_0x21484d);if(_0x59ae77&&(_0x59ae77[_0x237e5d(0x13d)](),this[_0x237e5d(0x1a6)][_0x237e5d(0x1aa)](_0x21484d)),_0x10431f?.[_0x237e5d(0x19e)]){const _0xb66b41=this[_0x237e5d(0x17b)](_0x10431f[_0x237e5d(0x19e)]);_0xb66b41&&_0xb66b41[_0x237e5d(0x16d)](_0x162973=>{const _0x3e4121=_0x237e5d;this[_0x3e4121(0x164)](_0x162973,_0x10431f[_0x3e4121(0x19e)],!0x1);});}this[_0x237e5d(0x194)][_0x237e5d(0x1aa)](_0x21484d),this[_0x237e5d(0x131)](_0x237e5d(0x177),{'uiId':_0x21484d,'type':_0x10431f?.[_0x237e5d(0x12b)]}),_0x237e5d(0x163)===_0x21484d&&this[_0x237e5d(0x136)]();}[_0x1b8728(0x1ab)](_0x530bc9,_0x267c7d){const _0x19e667=_0x1b8728;if(this[_0x19e667(0x194)][_0x19e667(0x18f)](_0x530bc9[_0x19e667(0x18c)])&&(this[_0x19e667(0x194)][_0x19e667(0x148)](_0x530bc9[_0x19e667(0x18c)],_0x530bc9),this[_0x19e667(0x131)](_0x19e667(0x198),{'contextItem':_0x530bc9,'isLoading':_0x267c7d}),_0x530bc9[_0x19e667(0x19e)])){const _0x3a6319=this[_0x19e667(0x17b)](_0x530bc9[_0x19e667(0x19e)]);_0x3a6319&&_0x3a6319[_0x19e667(0x16d)](_0x20493e=>{const _0x199f21=_0x19e667;this[_0x199f21(0x164)](_0x20493e,_0x530bc9[_0x199f21(0x19e)],!0x0);});}}[_0x1b8728(0x15e)](_0x1a1f73){const _0x215884=_0x1b8728;this[_0x215884(0x191)][_0x215884(0x148)](_0x1a1f73[_0x215884(0x18c)],_0x1a1f73);}[_0x1b8728(0x195)](){const _0x5a288e=_0x1b8728;this[_0x5a288e(0x156)]={'document':{'enabled':!0x1!==this[_0x5a288e(0x17d)]?.[_0x5a288e(0x1a3)]?.[_0x5a288e(0x14d)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x5a288e(0x17d)]?.[_0x5a288e(0x176)]?.[_0x5a288e(0x14d)]},'files':{'enabled':!0x1!==this[_0x5a288e(0x17d)]?.[_0x5a288e(0x175)]?.[_0x5a288e(0x14d)]},'sources':this[_0x5a288e(0x11c)]()},this[_0x5a288e(0x131)](_0x5a288e(0x16b),{'options':this[_0x5a288e(0x156)]});}[_0x1b8728(0x11c)](){const _0x408c3b=_0x1b8728;return this[_0x408c3b(0x17d)]?.[_0x408c3b(0x142)]?.[_0x408c3b(0x129)](_0x5b10f8=>({..._0x5b10f8,'resources':[]}))??[];}[_0x1b8728(0x136)](){const _0x5ec798=_0x1b8728,_0x3b8926=this[_0x5ec798(0x15a)]()||this[_0x5ec798(0x18a)]();this[_0x5ec798(0x156)][_0x5ec798(0x1a3)][_0x5ec798(0x161)]=_0x3b8926,this[_0x5ec798(0x131)](_0x5ec798(0x16b),{'options':this[_0x5ec798(0x156)]});}[_0x1b8728(0x174)](_0x22bb76){const _0x3cfde7=_0x1b8728;for(const _0x5294a9 of this[_0x3cfde7(0x194)][_0x3cfde7(0x13c)]())if(_0x5294a9[_0x3cfde7(0x19e)]===_0x22bb76)return!0x0;for(const _0x1ffbc7 of this[_0x3cfde7(0x191)][_0x3cfde7(0x13c)]())if(_0x1ffbc7[_0x3cfde7(0x19e)]===_0x22bb76)return!0x0;return!0x1;}[_0x1b8728(0x17b)](_0x35b891){const _0x5460ef=_0x1b8728,_0x48bf57=[];for(const _0x42ab08 of this[_0x5460ef(0x156)][_0x5460ef(0x142)]){_0x42ab08[_0x5460ef(0x182)][_0x5460ef(0x144)](_0x3876e0=>_0x3876e0['id']===_0x35b891)&&_0x48bf57[_0x5460ef(0x15b)](_0x42ab08['id']);}return 0x0===_0x48bf57[_0x5460ef(0x189)]?null:_0x48bf57;}[_0x1b8728(0x164)](_0x1e18c2,_0x18a8ca,_0x20a599){const _0x5e321b=_0x1b8728,_0x3f8f07=this[_0x5e321b(0x156)][_0x5e321b(0x142)][_0x5e321b(0x144)](_0x4f3661=>_0x4f3661['id']===_0x1e18c2);if(!_0x3f8f07)return;const _0x3878ed=_0x3f8f07[_0x5e321b(0x182)][_0x5e321b(0x144)](_0xfee1ee=>_0xfee1ee['id']===_0x18a8ca);_0x3878ed&&(_0x3878ed[_0x5e321b(0x13b)]=_0x20a599,this[_0x5e321b(0x131)](_0x5e321b(0x140),{'sourceId':_0x1e18c2,'resourceId':_0x18a8ca,'isInContext':_0x20a599}));}[_0x1b8728(0x14e)](_0x1d6b82){const _0x12a507=_0x1b8728;this[_0x12a507(0x122)][_0x12a507(0x148)](_0x1d6b82,!0x0),this[_0x12a507(0x122)][_0x12a507(0x14f)]&&this[_0x12a507(0x131)](_0x12a507(0x14b),{'isUploadInProgress':!0x0});}[_0x1b8728(0x150)](_0x19f12d){const _0x477efe=_0x1b8728;this[_0x477efe(0x122)][_0x477efe(0x1aa)](_0x19f12d),0x0===this[_0x477efe(0x122)][_0x477efe(0x14f)]&&this[_0x477efe(0x131)](_0x477efe(0x14b),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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}));}}
23
+ const _0x5d35bb=_0x4108;(function(_0x30aff0,_0x346f96){const _0x5059b2=_0x4108,_0x446833=_0x30aff0();while(!![]){try{const _0x518f28=-parseInt(_0x5059b2(0x22a))/0x1*(-parseInt(_0x5059b2(0x216))/0x2)+-parseInt(_0x5059b2(0x1ff))/0x3+parseInt(_0x5059b2(0x1f1))/0x4*(parseInt(_0x5059b2(0x242))/0x5)+parseInt(_0x5059b2(0x23e))/0x6+parseInt(_0x5059b2(0x227))/0x7+parseInt(_0x5059b2(0x213))/0x8+-parseInt(_0x5059b2(0x215))/0x9*(parseInt(_0x5059b2(0x22b))/0xa);if(_0x518f28===_0x346f96)break;else _0x446833['push'](_0x446833['shift']());}catch(_0xfa7766){_0x446833['push'](_0x446833['shift']());}}}(_0x36d4,0x5d069));import{CKEditorError as _0x3300af,EmitterMixin as _0x552bcd,logWarning as _0x4e7658}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x3b86b1}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x48455b,AI_CONTEXT_MODEL_EVENT_NAMES as _0xf5b5ec}from'./aichatcontext.js';import{AICapabilities as _0x323252,CAPABILITIES_MODEL_EVENT_NAMES as _0x4a513c}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x25023b}from'./aichatinteraction.js';function _0x4108(_0x27cb61,_0x470305){const _0x36d475=_0x36d4();return _0x4108=function(_0x4108bb,_0x4fcaa0){_0x4108bb=_0x4108bb-0x1d5;let _0x264f16=_0x36d475[_0x4108bb];return _0x264f16;},_0x4108(_0x27cb61,_0x470305);}function _0x36d4(){const _0x360f28=['user','addResourceToContext','destroy','assistant','toggleReasoning','chatModels','_extractContextItems','modelSelected','attributes','splice','updateCurrentDocumentInContext','toggleWebSearch','contextItems','appendContent','push','toLowerCase','title','ai-chat-conversation-init-from-id-failed','quickActionData','webSearch','prompt','fetchConversation','selectedModelId','interactions','getModel','ai-chat-handle-user-interaction-already-in-progress','length','conversationInitialized','fire','removeSelectionFromContext','type','isSelectionInContext','4FvsLUz','load','getInteraction','getPendingContextItems','conversationId','text','getCurrentDocumentContext','addSelectionToContext','ai-chat-conversation-already-started','model','capabilities','startConversation','updateCurrentDocument','getAll','1318431orBYgT','createReply','sessionId','getMessages','removeFromContext','getConversation','stack','role','getEditor','handleUserInteraction','ai-chat-conversation-set-model-null','hasOwn','message','delegate','stop','lastInteraction','content','loadSourceResources','isCurrentDocumentInConversation','getCapabilitiesConfig','3530352ltwsVb','addToConversationContext','9963621dksvjR','12hGxEev','createInteraction','selectedModel','addUrlToContext','ai-chat-conversation-init-failed','reasoning','group','populateFromMessage','ai-chat-conversation-start-failed','find','setConversationTitle','setModel','ai-chat-conversation-start-no-model-selected','currentReply','getDocumentContext','addCurrentDocumentToContext','indexOf','2989812KTmbYy','isAvailable','_processMessagesToInteractions','13277kQLDum','10hzbqjT','start','isStarted','error','connector','text-delta','addFilesToContext','currentInteraction','getAvailableModels','options','interactionCreated','conversationStarted','modification-delta','chatCapabilities','set','reset','removeInteraction','ai-chat-conversation-set-model-not-available','init','1314504zdGqtU','isCurrentDocumentInContext','fetchConversationMessages','chatContext','3802115kIPJqF','ai-chat-handle-user-conversation-not-initialized'];_0x36d4=function(){return _0x360f28;};return _0x36d4();}export class AIChatConversation extends _0x552bcd(){['id'];[_0x5d35bb(0x22d)]=!0x1;[_0x5d35bb(0x1e8)]=[];[_0x5d35bb(0x232)];[_0x5d35bb(0x218)];[_0x5d35bb(0x22f)];[_0x5d35bb(0x234)];constructor(_0x18f98d){const _0x22b091=_0x5d35bb;super(),this[_0x22b091(0x234)]=_0x18f98d,this[_0x22b091(0x22f)]=_0x18f98d[_0x22b091(0x22f)],this[_0x22b091(0x1d6)]=_0x18f98d[_0x22b091(0x1d6)],this['id']=_0x18f98d[_0x22b091(0x1f5)];}async[_0x5d35bb(0x23d)](_0x414b11){const _0x15db03=_0x5d35bb;try{this[_0x15db03(0x241)]=new _0x48455b({'connector':this[_0x15db03(0x22f)],'config':_0x414b11,'ownerId':this['id']}),this[_0x15db03(0x241)][_0x15db03(0x20c)](..._0xf5b5ec)['to'](this),this[_0x15db03(0x241)][_0x15db03(0x23d)](),this[_0x15db03(0x238)]=new _0x323252(),this[_0x15db03(0x238)][_0x15db03(0x20c)](..._0x4a513c)['to'](this),this[_0x15db03(0x238)][_0x15db03(0x23d)]();const _0x5f2c67=await this[_0x15db03(0x1d6)][_0x15db03(0x233)]();this[_0x15db03(0x1ed)](_0x15db03(0x1ec),{'availableModels':_0x5f2c67});const _0x41c2e1=await this[_0x15db03(0x1d6)][_0x15db03(0x1e9)](this[_0x15db03(0x234)][_0x15db03(0x1e7)]);_0x41c2e1&&await this[_0x15db03(0x221)](_0x41c2e1);}catch(_0x4e0c35){const _0x211198=new _0x3300af(_0x15db03(0x21a),null,{'message':_0x4e0c35[_0x15db03(0x20b)]});_0x211198[_0x15db03(0x205)]=_0x4e0c35[_0x15db03(0x205)],this[_0x15db03(0x1ed)](_0x15db03(0x22e),{'error':_0x211198});}}async[_0x5d35bb(0x22c)](){const _0x3ab90a=_0x5d35bb;if(this[_0x3ab90a(0x22d)])throw new _0x3300af(_0x3ab90a(0x1f9),null,{'conversation':this});if(!this[_0x3ab90a(0x218)])throw new _0x3300af(_0x3ab90a(0x222),null,{'conversation':this});try{const {id:_0x33810a}=await this[_0x3ab90a(0x22f)][_0x3ab90a(0x1fc)](this['id'],this[_0x3ab90a(0x234)][_0x3ab90a(0x21c)])[_0x3ab90a(0x204)]();this['id']=_0x33810a,this[_0x3ab90a(0x22d)]=!0x0,this[_0x3ab90a(0x1ed)](_0x3ab90a(0x236),{'conversationId':this['id'],'selectedModel':this[_0x3ab90a(0x218)]});}catch(_0x4c94ff){const _0x3e59de=new _0x3300af(_0x3ab90a(0x21e),null,{'message':_0x4c94ff[_0x3ab90a(0x20b)]});_0x3e59de[_0x3ab90a(0x205)]=_0x4c94ff[_0x3ab90a(0x205)],this[_0x3ab90a(0x1ed)](_0x3ab90a(0x22e),{'error':_0x3e59de});}}async[_0x5d35bb(0x1f2)](_0x36c71c,_0x47b183){const _0x26e0e1=_0x5d35bb;try{const _0x45487c=await this[_0x26e0e1(0x22f)][_0x26e0e1(0x1e6)](_0x36c71c)[_0x26e0e1(0x204)](),_0x341506=await this[_0x26e0e1(0x22f)][_0x26e0e1(0x240)](_0x36c71c)[_0x26e0e1(0x202)](),_0x33ba6c=_0x341506[0x0][_0x26e0e1(0x1fa)];this[_0x26e0e1(0x22d)]=!0x0,this['id']=_0x45487c['id'],_0x26e0e1(0x1e1)in _0x45487c?this[_0x26e0e1(0x1ed)](_0x26e0e1(0x220),_0x45487c[_0x26e0e1(0x1e1)],!0x0):this[_0x26e0e1(0x1ed)](_0x26e0e1(0x220),'',!0x0);const _0x48e1a1=(await this[_0x26e0e1(0x1d6)][_0x26e0e1(0x1fe)]())[_0x26e0e1(0x21f)](_0x372d91=>_0x372d91['id'][_0x26e0e1(0x1e0)]()===_0x33ba6c[_0x26e0e1(0x1e0)]());return this[_0x26e0e1(0x218)]=_0x48e1a1,this[_0x26e0e1(0x1ed)](_0x26e0e1(0x1d8),{'selectedModel':_0x48e1a1,'isDisabled':!0x0}),await this[_0x26e0e1(0x229)](_0x341506,_0x47b183,_0x33ba6c),this[_0x26e0e1(0x232)]=void 0x0,this;}catch(_0x560ced){const _0x444f2e=new _0x3300af(_0x26e0e1(0x1e2),null,{'message':_0x560ced[_0x26e0e1(0x20b)],'conversationId':_0x36c71c});throw _0x444f2e[_0x26e0e1(0x205)]=_0x560ced[_0x26e0e1(0x205)],this[_0x26e0e1(0x1ed)](_0x26e0e1(0x22e),{'error':_0x444f2e}),_0x444f2e;}}async[_0x5d35bb(0x229)](_0x4a495f,_0x53e0b9,_0x30714e){const _0x36f756=_0x5d35bb;let _0xe2ec0a;for(const _0x5df7b4 of _0x4a495f)if(_0x36f756(0x244)===_0x5df7b4[_0x36f756(0x206)]){const _0x178eac=await this[_0x36f756(0x1d7)](_0x5df7b4),_0x54a69c={'isReasoningEnabled':Object[_0x36f756(0x20a)](_0x5df7b4[_0x36f756(0x1fb)],_0x36f756(0x21b)),'isWebSearchEnabled':Object[_0x36f756(0x20a)](_0x5df7b4[_0x36f756(0x1fb)],_0x36f756(0x1e4))};_0xe2ec0a=this[_0x36f756(0x217)]({'userMessage':_0x5df7b4[_0x36f756(0x1e5)],'contextItems':_0x178eac,'capabilities':_0x54a69c,'modelId':_0x30714e,'quickActionData':_0x5df7b4[_0x36f756(0x1d9)]?.[_0x36f756(0x1e3)]}),this[_0x36f756(0x232)]=_0xe2ec0a,this[_0x36f756(0x241)][_0x36f756(0x214)](this[_0x36f756(0x232)][_0x36f756(0x1dd)]);}else{if(_0x36f756(0x247)===_0x5df7b4[_0x36f756(0x206)]&&_0xe2ec0a)for(const _0x32daea of _0x5df7b4[_0x36f756(0x20f)]){const _0x26bf36=_0x36f756(0x1f6)===_0x32daea[_0x36f756(0x1ef)]?_0x36f756(0x230):_0x36f756(0x237),_0x3296cd=_0xe2ec0a[_0x36f756(0x224)]()?.[_0x36f756(0x201)]!==_0x53e0b9;_0xe2ec0a[_0x36f756(0x223)]=_0xe2ec0a[_0x36f756(0x200)]({'type':_0x26bf36,'isDone':!0x0,'interactionId':_0xe2ec0a['id'],'areActionsDisabled':_0x3296cd}),_0xe2ec0a[_0x36f756(0x223)][_0x36f756(0x1de)](_0x32daea[_0x36f756(0x20f)]);}}}async[_0x5d35bb(0x1d7)](_0x55963b){const _0x1aa94b=_0x5d35bb,_0x12e3d4=new Map();if(!_0x55963b[_0x1aa94b(0x20f)])return _0x12e3d4;for(const _0x578431 of _0x55963b[_0x1aa94b(0x20f)]){const _0x47df96=await this[_0x1aa94b(0x241)][_0x1aa94b(0x21d)](_0x578431);_0x47df96&&_0x12e3d4[_0x1aa94b(0x239)](_0x47df96['id'],_0x47df96);}return _0x12e3d4;}async[_0x5d35bb(0x208)]({userMessage:_0x10a9e1,quickActionData:_0x2b73fc}){const _0x4e1ca0=_0x5d35bb;if(!this[_0x4e1ca0(0x22d)])throw new _0x3300af(_0x4e1ca0(0x243),null,{'conversation':this});if(this[_0x4e1ca0(0x232)])throw new _0x3300af(_0x4e1ca0(0x1ea),null,{'conversation':this});try{const _0x49cdc6=this[_0x4e1ca0(0x241)][_0x4e1ca0(0x1f4)](),_0x2c8a44=this[_0x4e1ca0(0x238)][_0x4e1ca0(0x212)](),_0xe84670=this[_0x4e1ca0(0x218)]['id'];this[_0x4e1ca0(0x232)]=this[_0x4e1ca0(0x217)]({'userMessage':_0x10a9e1,'contextItems':_0x49cdc6,'capabilities':_0x2c8a44,'modelId':_0xe84670,'quickActionData':_0x2b73fc}),await this[_0x4e1ca0(0x232)][_0x4e1ca0(0x22c)](),this[_0x4e1ca0(0x241)][_0x4e1ca0(0x214)](this[_0x4e1ca0(0x232)][_0x4e1ca0(0x1dd)]);}catch(_0x41ee3a){this[_0x4e1ca0(0x1ed)](_0x4e1ca0(0x22e),{'interactionId':this[_0x4e1ca0(0x232)]?this[_0x4e1ca0(0x232)]['id']:void 0x0,'error':_0x41ee3a});}finally{this[_0x4e1ca0(0x232)]?.[_0x4e1ca0(0x20d)](),this[_0x4e1ca0(0x232)]=void 0x0;}}[_0x5d35bb(0x217)]({userMessage:_0x200ffc,contextItems:_0x325e04,capabilities:_0x112657,modelId:_0x50cfc5,quickActionData:_0xacbfd2}){const _0x4ba607=_0x5d35bb,_0x185a70=new _0x25023b({'userMessage':_0x200ffc,'contextItems':_0x325e04,'capabilities':_0x112657,'conversationId':this['id'],'connector':this[_0x4ba607(0x22f)],'editor':this[_0x4ba607(0x234)][_0x4ba607(0x207)]&&this[_0x4ba607(0x234)][_0x4ba607(0x207)](),'model':_0x50cfc5,'quickActionData':_0xacbfd2});return _0x185a70[_0x4ba607(0x20c)](..._0x3b86b1)['to'](this),this[_0x4ba607(0x1e8)][_0x4ba607(0x1df)](_0x185a70),this[_0x4ba607(0x1ed)](_0x4ba607(0x235),_0x185a70),_0x185a70;}[_0x5d35bb(0x1f3)](_0xdd2eae){const _0x5a0073=_0x5d35bb;return this[_0x5a0073(0x1e8)][_0x5a0073(0x21f)](_0x202802=>_0x202802['id']===_0xdd2eae);}[_0x5d35bb(0x23b)](_0x33d6c9){const _0x454a9b=_0x5d35bb,_0x2237e1=this[_0x454a9b(0x1f3)](_0x33d6c9);_0x2237e1&&(_0x2237e1[_0x454a9b(0x246)](),this[_0x454a9b(0x1e8)][_0x454a9b(0x1da)](this[_0x454a9b(0x1e8)][_0x454a9b(0x226)](_0x2237e1),0x1));}get[_0x5d35bb(0x20e)](){const _0x47d521=_0x5d35bb;return this[_0x47d521(0x1e8)][this[_0x47d521(0x1e8)][_0x47d521(0x1eb)]-0x1];}[_0x5d35bb(0x225)](_0x9d1b9){const _0x4dfdcc=_0x5d35bb;this[_0x4dfdcc(0x241)][_0x4dfdcc(0x225)](_0x9d1b9);}async[_0x5d35bb(0x1db)]({content:_0x526df1,version:_0x56b86a,sessionId:_0x376167,selections:_0x17a598}){const _0x3e8fb7=_0x5d35bb;await this[_0x3e8fb7(0x241)][_0x3e8fb7(0x1fd)](_0x526df1,_0x56b86a,_0x376167,_0x17a598);}[_0x5d35bb(0x1f7)](){const _0x3b1e58=_0x5d35bb;return this[_0x3b1e58(0x232)]?.[_0x3b1e58(0x224)]()?.[_0x3b1e58(0x20f)]||'';}[_0x5d35bb(0x1f8)](_0x387763){const _0x3e24cd=_0x5d35bb;this[_0x3e24cd(0x241)][_0x3e24cd(0x1f8)](_0x387763);}[_0x5d35bb(0x1ee)](){const _0x40f1f5=_0x5d35bb;this[_0x40f1f5(0x241)][_0x40f1f5(0x1ee)]();}[_0x5d35bb(0x231)](_0x170bc4){const _0x51e298=_0x5d35bb;this[_0x51e298(0x241)][_0x51e298(0x231)](_0x170bc4);}[_0x5d35bb(0x219)](_0x44f123){const _0x27f3ba=_0x5d35bb;this[_0x27f3ba(0x241)][_0x27f3ba(0x219)](_0x44f123);}[_0x5d35bb(0x245)](_0x559d7c,_0x14c6da){const _0x182730=_0x5d35bb;this[_0x182730(0x241)][_0x182730(0x245)](_0x559d7c,_0x14c6da);}[_0x5d35bb(0x210)](_0x4bfd2e,_0x348931,_0x5b2caf){const _0x5a9940=_0x5d35bb;return this[_0x5a9940(0x241)][_0x5a9940(0x210)](_0x4bfd2e,_0x348931,_0x5b2caf);}[_0x5d35bb(0x203)](_0x3c14c9){const _0xd1e15=_0x5d35bb;this[_0xd1e15(0x241)][_0xd1e15(0x203)](_0x3c14c9);}[_0x5d35bb(0x1dc)](){const _0x311bc7=_0x5d35bb;this[_0x311bc7(0x238)][_0x311bc7(0x1dc)]();}[_0x5d35bb(0x1d5)](){const _0xbf79d9=_0x5d35bb;this[_0xbf79d9(0x238)][_0xbf79d9(0x1d5)]();}[_0x5d35bb(0x23f)](){const _0x57007c=_0x5d35bb;return this[_0x57007c(0x241)][_0x57007c(0x23f)]();}[_0x5d35bb(0x211)](){const _0x41ad9a=_0x5d35bb;return this[_0x41ad9a(0x241)][_0x41ad9a(0x211)]();}[_0x5d35bb(0x1f0)](){const _0x564b50=_0x5d35bb;return this[_0x564b50(0x241)][_0x564b50(0x1f0)]();}async[_0x5d35bb(0x221)](_0x4e7125){const _0x391683=_0x5d35bb;_0x4e7125?!0x1===await this[_0x391683(0x1d6)][_0x391683(0x228)](_0x4e7125)&&(_0x4e7658(_0x391683(0x23c),{'conversation':this,'model':_0x4e7125}),_0x4e7125=(await this[_0x391683(0x1d6)][_0x391683(0x233)]())[0x0]):(_0x4e7658(_0x391683(0x209),{'conversation':this}),_0x4e7125=(await this[_0x391683(0x1d6)][_0x391683(0x233)]())[0x0]),_0x4e7125['id']!==this[_0x391683(0x218)]?.['id']&&(this[_0x391683(0x218)]=_0x4e7125,this[_0x391683(0x238)][_0x391683(0x23a)](),this[_0x391683(0x1ed)](_0x391683(0x1d8),{'selectedModel':_0x4e7125}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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));}}
23
+ var _0x1659a6=_0x6fd5;(function(_0x2f59eb,_0x2a2ff6){var _0x463d84=_0x6fd5,_0x4c2b52=_0x2f59eb();while(!![]){try{var _0x230df3=parseInt(_0x463d84(0xdd))/0x1+-parseInt(_0x463d84(0xd4))/0x2*(parseInt(_0x463d84(0xd0))/0x3)+parseInt(_0x463d84(0xcd))/0x4+-parseInt(_0x463d84(0xdb))/0x5*(-parseInt(_0x463d84(0xcf))/0x6)+parseInt(_0x463d84(0xe0))/0x7*(parseInt(_0x463d84(0xda))/0x8)+-parseInt(_0x463d84(0xd1))/0x9+parseInt(_0x463d84(0xd8))/0xa*(parseInt(_0x463d84(0xce))/0xb);if(_0x230df3===_0x2a2ff6)break;else _0x4c2b52['push'](_0x4c2b52['shift']());}catch(_0x18439e){_0x4c2b52['push'](_0x4c2b52['shift']());}}}(_0x4e97,0x9f425));function _0x4e97(){var _0x3c18d3=['2718tLVwbf','3219693gWONsb','7514352SlBcUt','contextItems','quickActionData','2QVMpeU','getCapabilitiesRequestData','conversationId','queryAssistant','10309190kopbwz','capabilities','1168mHRAyv','4745fRdStM','current-document','59393WVxyZC','connector','sendRequest','25018rwrhID','get','getDocumentContext','mapContextItemsToRequestData','userMessage','model','2073884QGHgqq','11Yaqiwk'];_0x4e97=function(){return _0x3c18d3;};return _0x4e97();}import{AICapabilities as _0x18d4e3}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x4af503}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x2f3be7}from'./aichatcontext.js';function _0x6fd5(_0x47b483,_0xe5db34){var _0x4e978c=_0x4e97();return _0x6fd5=function(_0x6fd5f1,_0x2d3990){_0x6fd5f1=_0x6fd5f1-0xc8;var _0x49a989=_0x4e978c[_0x6fd5f1];return _0x49a989;},_0x6fd5(_0x47b483,_0xe5db34);}export class AIChatInteraction extends _0x4af503{[_0x1659a6(0xcb)];[_0x1659a6(0xd6)];[_0x1659a6(0xd2)]=new Map();[_0x1659a6(0xcc)];[_0x1659a6(0xd3)];constructor(_0x32f4af){var _0x3c2b57=_0x1659a6;super(_0x32f4af),this[_0x3c2b57(0xd6)]=_0x32f4af[_0x3c2b57(0xd6)],this[_0x3c2b57(0xd2)]=_0x32f4af[_0x3c2b57(0xd2)],this[_0x3c2b57(0xd9)]=_0x32f4af[_0x3c2b57(0xd9)],this[_0x3c2b57(0xcb)]=_0x32f4af[_0x3c2b57(0xcb)],this[_0x3c2b57(0xcc)]=_0x32f4af[_0x3c2b57(0xcc)],this[_0x3c2b57(0xd3)]=_0x32f4af[_0x3c2b57(0xd3)];}async[_0x1659a6(0xdf)](){var _0x197ded=_0x1659a6;return this[_0x197ded(0xde)][_0x197ded(0xd7)]({'message':this[_0x197ded(0xcb)],'conversationId':this[_0x197ded(0xd6)],'parts':_0x2f3be7[_0x197ded(0xca)](this[_0x197ded(0xd2)]),'capabilities':_0x18d4e3[_0x197ded(0xd5)](this[_0x197ded(0xd9)]),'model':this[_0x197ded(0xcc)],'quickActionData':this[_0x197ded(0xd3)]});}[_0x1659a6(0xc9)](){var _0x56cc63=_0x1659a6;return this[_0x56cc63(0xd2)][_0x56cc63(0xc8)](_0x56cc63(0xdc));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x4fe3(_0xbdd6a8,_0x50ae97){const _0x365b8e=_0x365b();return _0x4fe3=function(_0x4fe339,_0x159d32){_0x4fe339=_0x4fe339-0x1ba;let _0x1c7bee=_0x365b8e[_0x4fe339];return _0x1c7bee;},_0x4fe3(_0xbdd6a8,_0x50ae97);}const _0x4ce729=_0x4fe3;(function(_0x293b26,_0x164ffc){const _0x3a4462=_0x4fe3,_0x5dcb4f=_0x293b26();while(!![]){try{const _0x4ce7dc=parseInt(_0x3a4462(0x1d0))/0x1*(-parseInt(_0x3a4462(0x1de))/0x2)+-parseInt(_0x3a4462(0x1e0))/0x3+parseInt(_0x3a4462(0x1dc))/0x4+-parseInt(_0x3a4462(0x1d8))/0x5+-parseInt(_0x3a4462(0x1d7))/0x6+parseInt(_0x3a4462(0x1da))/0x7+parseInt(_0x3a4462(0x1c4))/0x8*(parseInt(_0x3a4462(0x1c2))/0x9);if(_0x4ce7dc===_0x164ffc)break;else _0x5dcb4f['push'](_0x5dcb4f['shift']());}catch(_0x46f0a3){_0x5dcb4f['push'](_0x5dcb4f['shift']());}}}(_0x365b,0x49485));import{EmitterMixin as _0xcd2e4c,logWarning as _0x42a2a0}from'ckeditor5/src/utils.js';export class AIChatModels extends _0xcd2e4c(){[_0x4ce729(0x1d5)]=[];[_0x4ce729(0x1c1)];[_0x4ce729(0x1cf)];[_0x4ce729(0x1c0)];constructor({connector:_0x3937a5,displayedModels:_0x3a5237,defaultModelId:_0x3c2a93}){const _0x4a991e=_0x4ce729;super(),this[_0x4a991e(0x1c1)]=_0x3937a5,this[_0x4a991e(0x1cf)]=_0x3a5237,this[_0x4a991e(0x1c0)]=_0x3c2a93;}async[_0x4ce729(0x1cd)](){const _0x5c8580=_0x4ce729;if(!this[_0x5c8580(0x1d5)][_0x5c8580(0x1c3)]){const _0x320774=this[_0x5c8580(0x1c1)][_0x5c8580(0x1bb)](),_0x35423c=(await _0x320774[_0x5c8580(0x1cc)]())[_0x5c8580(0x1d9)][_0x5c8580(0x1d3)]((_0x1d8a22,_0x314271)=>{const _0x270784=_0x5c8580,_0x54c3ea=Object[_0x270784(0x1c5)](_0x1d8a22[_0x270784(0x1bf)])[_0x270784(0x1ba)](_0x3979aa=>_0x3979aa[_0x270784(0x1ca)])[_0x270784(0x1c3)];return Object[_0x270784(0x1c5)](_0x314271[_0x270784(0x1bf)])[_0x270784(0x1ba)](_0x5428f7=>_0x5428f7[_0x270784(0x1ca)])[_0x270784(0x1c3)]-_0x54c3ea;});this[_0x5c8580(0x1d5)]=_0x35423c;}return this[_0x5c8580(0x1d5)];}async[_0x4ce729(0x1d4)](){const _0x160d52=_0x4ce729,_0x1ce18d=await this[_0x160d52(0x1cd)]();return this[_0x160d52(0x1cb)](_0x1ce18d,this[_0x160d52(0x1cf)]);}async[_0x4ce729(0x1c8)](_0x314c11){const _0x27a35b=_0x4ce729,_0x4ee89c=await this[_0x27a35b(0x1cd)]();if(!_0x4ee89c[_0x27a35b(0x1c3)])return null;if(_0x314c11){const _0x2678ad=_0x4ee89c[_0x27a35b(0x1c9)](_0x492a3a=>_0x492a3a['id']===_0x314c11);if(_0x2678ad)return _0x2678ad;_0x42a2a0(_0x27a35b(0x1d1),{'modelId':_0x314c11,'fallBackModelId':this[_0x27a35b(0x1c0)]});}return this[_0x27a35b(0x1dd)]();}async[_0x4ce729(0x1dd)](){const _0x279bf6=_0x4ce729,_0x797a05=await this[_0x279bf6(0x1d4)]();if(!_0x797a05[_0x279bf6(0x1c3)])return null;if(this[_0x279bf6(0x1c0)]){const _0x32a464=_0x797a05[_0x279bf6(0x1c9)](_0x317707=>_0x317707['id']===this[_0x279bf6(0x1c0)]);if(_0x32a464)return _0x32a464;_0x42a2a0(_0x279bf6(0x1db),{'defaultModelId':this[_0x279bf6(0x1c0)],'fallBackModelId':_0x797a05[0x0]['id']});}return _0x797a05[0x0];}async[_0x4ce729(0x1c6)](_0x147c3c){const _0x167129=_0x4ce729;return(await this[_0x167129(0x1d4)]())[_0x167129(0x1bd)](_0x2b1a1f=>_0x2b1a1f[_0x167129(0x1d2)]===_0x147c3c[_0x167129(0x1d2)]&&_0x2b1a1f[_0x167129(0x1bc)]===_0x147c3c[_0x167129(0x1bc)]);}[_0x4ce729(0x1cb)](_0x2a8849,_0x2849a4){const _0x54df79=_0x4ce729;let _0x5b7aa7;if(_0x2849a4){_0x5b7aa7=[];const _0x4fd58b=_0x54df79(0x1d6)==typeof _0x2849a4?[_0x2849a4[_0x54df79(0x1ce)]()]:_0x2849a4[_0x54df79(0x1be)](_0x36270d=>_0x36270d[_0x54df79(0x1ce)]());for(const _0x5bd37a of _0x4fd58b)for(const _0x11ea06 of _0x2a8849)(_0x11ea06['id'][_0x54df79(0x1ce)]()===_0x5bd37a||_0x11ea06[_0x54df79(0x1d2)][_0x54df79(0x1ce)]()===_0x5bd37a||_0x11ea06[_0x54df79(0x1bc)][_0x54df79(0x1ce)]()===_0x5bd37a||_0x11ea06['id'][_0x54df79(0x1ce)]()[_0x54df79(0x1c7)](_0x5bd37a))&&_0x5b7aa7[_0x54df79(0x1df)](_0x11ea06);}else _0x5b7aa7=_0x2a8849;return _0x5b7aa7;}}function _0x365b(){const _0x4d3171=['1743760iJSxSh','getDefault','294274XCrBwv','push','1143330hBVVij','filter','getModels','provider','some','map','capabilities','_defaultModelId','_connector','43245fBZygv','length','2088xXUOsh','values','isAvailable','startsWith','getModel','find','enabled','_filterModels','list','getAll','toLocaleLowerCase','_displayedModels','3gdpdhL','ai-chat-model-id-unrecognized','name','sort','getAvailableModels','_modelList','string','2924526SPJzdH','921795OOHKdp','items','730947uXexBD','ai-chat-default-model-id-unrecognized'];_0x365b=function(){return _0x4d3171;};return _0x365b();}
23
+ const _0x495f61=_0x55d1;function _0x55d1(_0x15fa8e,_0x280ce3){const _0x1cafa5=_0x1caf();return _0x55d1=function(_0x55d141,_0x15c2ee){_0x55d141=_0x55d141-0x18e;let _0x177df1=_0x1cafa5[_0x55d141];return _0x177df1;},_0x55d1(_0x15fa8e,_0x280ce3);}(function(_0x149775,_0x401a69){const _0x4dd1dc=_0x55d1,_0x16976a=_0x149775();while(!![]){try{const _0x44d340=parseInt(_0x4dd1dc(0x1a9))/0x1+-parseInt(_0x4dd1dc(0x191))/0x2*(parseInt(_0x4dd1dc(0x1a7))/0x3)+-parseInt(_0x4dd1dc(0x1ab))/0x4+-parseInt(_0x4dd1dc(0x1a0))/0x5*(-parseInt(_0x4dd1dc(0x19f))/0x6)+parseInt(_0x4dd1dc(0x19b))/0x7+-parseInt(_0x4dd1dc(0x1af))/0x8+parseInt(_0x4dd1dc(0x1b4))/0x9;if(_0x44d340===_0x401a69)break;else _0x16976a['push'](_0x16976a['shift']());}catch(_0x1df173){_0x16976a['push'](_0x16976a['shift']());}}}(_0x1caf,0x5c332));function _0x1caf(){const _0x95bd72=['ai-chat-model-id-unrecognized','push','_modelList','3mHbPVU','name','740990fCLaas','provider','2248552xGmbtO','startsWith','map','_displayedModels','1726096SMvdrZ','_connector','getModels','values','list','1090629emZBVz','capabilities','toLocaleLowerCase','some','427106dsxuGg','find','getAll','sort','enabled','items','length','isAvailable','getAvailableModels','ai-chat-default-model-id-unrecognized','2927596RQoPpH','_defaultModelId','filter','getDefault','38016JdOBIi','70otjzcm','getModel','string','_filterModels'];_0x1caf=function(){return _0x95bd72;};return _0x1caf();}import{EmitterMixin as _0x4cce7e,logWarning as _0x2ddb62}from'ckeditor5/src/utils.js';export class AIChatModels extends _0x4cce7e(){[_0x495f61(0x1a6)]=[];[_0x495f61(0x1b0)];[_0x495f61(0x1ae)];[_0x495f61(0x19c)];constructor({connector:_0x1d3a4b,displayedModels:_0x166a32,defaultModelId:_0x40abc1}){const _0x13f712=_0x495f61;super(),this[_0x13f712(0x1b0)]=_0x1d3a4b,this[_0x13f712(0x1ae)]=_0x166a32,this[_0x13f712(0x19c)]=_0x40abc1;}async[_0x495f61(0x193)](){const _0x5b838e=_0x495f61;if(!this[_0x5b838e(0x1a6)][_0x5b838e(0x197)]){const _0x392a87=this[_0x5b838e(0x1b0)][_0x5b838e(0x1b1)](),_0x384eea=(await _0x392a87[_0x5b838e(0x1b3)]())[_0x5b838e(0x196)][_0x5b838e(0x194)]((_0x1c69a8,_0x1a853c)=>{const _0x739fa6=_0x5b838e,_0x22680a=Object[_0x739fa6(0x1b2)](_0x1c69a8[_0x739fa6(0x18e)])[_0x739fa6(0x19d)](_0xa93e7=>_0xa93e7[_0x739fa6(0x195)])[_0x739fa6(0x197)];return Object[_0x739fa6(0x1b2)](_0x1a853c[_0x739fa6(0x18e)])[_0x739fa6(0x19d)](_0x42513a=>_0x42513a[_0x739fa6(0x195)])[_0x739fa6(0x197)]-_0x22680a;});this[_0x5b838e(0x1a6)]=_0x384eea;}return this[_0x5b838e(0x1a6)];}async[_0x495f61(0x199)](){const _0x114a98=_0x495f61,_0x4ed99c=await this[_0x114a98(0x193)]();return this[_0x114a98(0x1a3)](_0x4ed99c,this[_0x114a98(0x1ae)]);}async[_0x495f61(0x1a1)](_0x338bca){const _0x2990dd=_0x495f61,_0x3f1985=await this[_0x2990dd(0x193)]();if(!_0x3f1985[_0x2990dd(0x197)])return null;if(_0x338bca){const _0x3abc62=_0x3f1985[_0x2990dd(0x192)](_0x1d9ad9=>_0x1d9ad9['id']===_0x338bca);if(_0x3abc62)return _0x3abc62;_0x2ddb62(_0x2990dd(0x1a4),{'modelId':_0x338bca,'fallBackModelId':this[_0x2990dd(0x19c)]});}return this[_0x2990dd(0x19e)]();}async[_0x495f61(0x19e)](){const _0x394a8a=_0x495f61,_0x64ea56=await this[_0x394a8a(0x199)]();if(!_0x64ea56[_0x394a8a(0x197)])return null;if(this[_0x394a8a(0x19c)]){const _0x3a4398=_0x64ea56[_0x394a8a(0x192)](_0xa0928=>_0xa0928['id']===this[_0x394a8a(0x19c)]);if(_0x3a4398)return _0x3a4398;_0x2ddb62(_0x394a8a(0x19a),{'defaultModelId':this[_0x394a8a(0x19c)],'fallBackModelId':_0x64ea56[0x0]['id']});}return _0x64ea56[0x0];}async[_0x495f61(0x198)](_0x1fc33b){const _0x5c2819=_0x495f61;return(await this[_0x5c2819(0x199)]())[_0x5c2819(0x190)](_0x1bbb59=>_0x1bbb59[_0x5c2819(0x1a8)]===_0x1fc33b[_0x5c2819(0x1a8)]&&_0x1bbb59[_0x5c2819(0x1aa)]===_0x1fc33b[_0x5c2819(0x1aa)]);}[_0x495f61(0x1a3)](_0x2aeb0e,_0x13ded0){const _0x398eda=_0x495f61;let _0x299bf0;if(_0x13ded0){_0x299bf0=[];const _0x5339fc=_0x398eda(0x1a2)==typeof _0x13ded0?[_0x13ded0[_0x398eda(0x18f)]()]:_0x13ded0[_0x398eda(0x1ad)](_0xf69cf3=>_0xf69cf3[_0x398eda(0x18f)]());for(const _0x4187ba of _0x5339fc)for(const _0x279b38 of _0x2aeb0e)(_0x279b38['id'][_0x398eda(0x18f)]()===_0x4187ba||_0x279b38[_0x398eda(0x1a8)][_0x398eda(0x18f)]()===_0x4187ba||_0x279b38[_0x398eda(0x1aa)][_0x398eda(0x18f)]()===_0x4187ba||_0x279b38['id'][_0x398eda(0x18f)]()[_0x398eda(0x1ac)](_0x4187ba))&&_0x299bf0[_0x398eda(0x1a5)](_0x279b38);}else _0x299bf0=_0x2aeb0e;return _0x299bf0;}}