@ckeditor/ckeditor5-ai 47.3.0-alpha.6 → 47.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +5 -5
  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/aichatcontextresourceslistview.js +1 -1
  197. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  198. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  200. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.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/aichathistory/aichathistory.js +1 -1
  212. package/src/aichathistory/aichathistorycontroller.js +1 -1
  213. package/src/aichathistory/aichathistoryui.js +1 -1
  214. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  215. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  216. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  217. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  218. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  219. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  220. package/src/aicore/aiconnector.js +1 -1
  221. package/src/aicore/aiediting.js +1 -1
  222. package/src/aicore/model/aicapabilities.js +1 -1
  223. package/src/aicore/model/aicontext.js +1 -1
  224. package/src/aicore/model/aiinteraction.js +1 -1
  225. package/src/aicore/model/aimodels.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/aicore/utils/scrollmanager.js +1 -1
  248. package/src/aieditorintegration/aieditorintegration.js +1 -1
  249. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  250. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  251. package/src/aiquickactions/aiquickactions.js +1 -1
  252. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  253. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  254. package/src/aiquickactions/aiquickactionsui.js +1 -1
  255. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  256. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  257. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  258. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  259. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  260. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  261. package/src/aireviewmode/aireviewmode.js +1 -1
  262. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  263. package/src/aireviewmode/aireviewmodeediting.js +1 -1
  264. package/src/aireviewmode/aireviewmodeui.js +1 -1
  265. package/src/aireviewmode/model/aireviewcheck.js +1 -1
  266. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  267. package/src/aireviewmode/model/aireviewchecklist.js +1 -1
  268. package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
  269. package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
  270. package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
  271. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  272. package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
  273. package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
  274. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
  275. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
  276. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
  277. package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
  278. package/src/aireviewmode/ui/aireviewmodegeneralerrorview.js +1 -1
  279. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
  280. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
  281. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
  282. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
  283. package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
  284. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
  285. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
  286. package/src/aitabs/aitabs.js +1 -1
  287. package/src/aitabs/aitabsmainview.js +1 -1
  288. package/src/aitabs/tabs/aitabsview.js +1 -1
  289. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  290. package/src/aitabs/tabs/tabpanelview.js +1 -1
  291. package/src/errors.js +1 -1
  292. package/src/errorsmap.js +1 -1
  293. package/src/index.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xf7bdc8=_0x2f7d;function _0x2f7d(_0x231b9e,_0x46d1e2){const _0x4829c5=_0x4829();return _0x2f7d=function(_0x2f7d67,_0x338f95){_0x2f7d67=_0x2f7d67-0x15f;let _0x226b14=_0x4829c5[_0x2f7d67];return _0x226b14;},_0x2f7d(_0x231b9e,_0x46d1e2);}(function(_0x130ca5,_0x5ddc64){const _0x53a765=_0x2f7d,_0x17c463=_0x130ca5();while(!![]){try{const _0x4e861d=-parseInt(_0x53a765(0x23a))/0x1*(-parseInt(_0x53a765(0x28e))/0x2)+-parseInt(_0x53a765(0x19c))/0x3*(-parseInt(_0x53a765(0x2bd))/0x4)+-parseInt(_0x53a765(0x1d4))/0x5+-parseInt(_0x53a765(0x22f))/0x6*(parseInt(_0x53a765(0x1b7))/0x7)+-parseInt(_0x53a765(0x283))/0x8*(-parseInt(_0x53a765(0x21a))/0x9)+-parseInt(_0x53a765(0x1c9))/0xa+-parseInt(_0x53a765(0x23e))/0xb*(parseInt(_0x53a765(0x18b))/0xc);if(_0x4e861d===_0x5ddc64)break;else _0x17c463['push'](_0x17c463['shift']());}catch(_0x59a475){_0x17c463['push'](_0x17c463['shift']());}}}(_0x4829,0x54da7));import{ContextPlugin as _0x168ff1,Editor as _0x2b4142}from'ckeditor5/src/core.js';import{CKEditorError as _0x217c5a,logError as _0x39c475,scrollViewportToShowTarget as _0x145ff8,uid as _0x532b26}from'ckeditor5/src/utils.js';import{AIConnector as _0xb0fd74}from'../aicore/aiconnector.js';import{AITabs as _0x4f4427}from'../aitabs/aitabs.js';import{AIChatConversation as _0x208493}from'./model/aichatconversation.js';import{getTranslation as _0x5f46ca}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3ca273}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x419f44}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3dfc6a}from'./model/aichatmodels.js';import{getEditorFromContext as _0x554683}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x53c37e,DATA_ID_MODEL_ATTRIBUTE as _0x230da6}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x5bcc09,getOperationsFromReply as _0x54130d}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x2ca72d,getMinimalSelection as _0x5be61d}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0xcfb78,_DetachOperation as _0x1a206a}from'ckeditor5/src/engine.js';import{findOne as _0x262c1,getAttribute as _0x3e07fb,serialize as _0x1c4235,Document as _0x48ab8a,findByAttribute as _0x405389}from'../aicore/utils/htmlparser.js';import{IconAI as _0x477ad5}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x5e7af4}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x20014a}from'../aiballoon/aiballoon.js';function _0x4829(){const _0xdb6dd3=['AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','_aiChatUi','addFeedItemAIReply','uiId','contextItemAdded','_toggleWebSearch','ai-chat-conversation-not-found','batch','updateCurrentDocumentInContext','loadConversation','isDisabled','pluginName','undo','_toggleReasoning','change','resourceStateChanged','addFeedItemStaticMessage','version','ai-chat-context-unsupported-type','getConversation','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','interactionDestroyed','root','replyId','sendMessage','commands','_applyOperationsAsSuggestions','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','listenTo','getMarkersGroup','_updateReplyContent','setIsUploadInProgress','contextItems','ai-chat-controller-mouse-over','isModelAvailable','error','get','unshift','2685684wIzNaV','add','set','messageId','capabilitiesUpdated','_flushLastInteractionUI','reasoningFinished','removeSelectionFromChatContext','AIChatUI','setConversationTitle','ai-chat-context-unsupported-file-type','text-delta','_aiEditing','collaboration.channelId','setChangeGroupState','removeFromContext','showFakeVisualSelection','init','ai-chat-invalid-request','getInteractionAndReplyById','closeSourceResourceBalloon','path','editing','interactionCreated','webSearchStarted','ai-chat-conversation-start-failed','ai-chat-controller-no-active-conversation','interactionStarted','setModel','context','_applySuggestion','contextItemRemoved','data','addSelectionToContext','mouseLeaveSuggestion','_getDocumentRangeForReplyChanges','findIndex','revert','query','startConversation','ready','getAttribute','getChild','isInContext','getTransformedByOperation','abortPromptStream','data-id','DocumentCompare','rootName','type','AI_CHAT_RESOURCE_LOAD_FAILED','dislike','editors','updateContent','sendUserMessage','AI_CHAT_INVALID_REQUEST','getPath','mapper','replyChangeGroupStateUpdated','ai-chat-resource-load-failed','5604aaPoWT','AIChatController','close','Showing\x20conversation\x20history...','cloneNode','addFeedInteractionHeader','toString','addFilesToContext','like','start','indexes','has','_handleStartConversation','isPremiumPlugin','modelSelected','outdated','isCurrentDocumentInContext','3YVtFjw','_removeAISelectionMarkers','toggleSuggestionDisplayMode','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','resizedTabs','pending','ai-chat-url-upload-failed','ai.chat.context','isOfficialPlugin','split','getOperations','scrollFeedToSuggestion','nextSibling','_removeFromContext','_integrateEditor','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','_showConversationHistory','resourceId','addResourceToContext','conversationInitialized','getChildAtOffset','getDocumentContext','domConverter','addContextOptionsChanged','delete','addFeedItemError','_scrollToSuggestionRange','1467445pqYIAV','dialogClosed','addFeedItemUserMessage','toggleReasoning','ai-chat-file-upload-failed','selectedModel','ai-chat-context-invalid-data','mouseOverSuggestion','updateFeedItemAIReplyContent','getReply','webSearchFinished','options','addFeedItemAISuggestion','state','setAddContextOptions','contextSent','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','resetMessageInput','366320wsoFKP','stopInteraction','enableControls','AI_CHAT_UNTITLED_CONVERSATION','fetchConversation','sourcePosition','documentContextContent','updateFeedItemAIReplySuggestionContent','updateFeedItemAIReplySources','changeGroups','end','3105085ysHzqN','showPrevious','find','isLoading','hasChanges','forEach','_createFromRanges','toggleLoadingSkeleton','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','sources','new','log','AIEditing','ai-chat-context-file-too-many-pages','applyOperation','maxOffset','push','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai.chat.models.displayedModels','ai-chat-conversation-init-failed','_openBalloonFor','from','uid','removeMarker','stopListening','hideFakeVisualSelection','Undo','_insertSuggestion','setFeedItemRenderingStrategy','load','addFileToContext','interactionId','showDiff','startInteraction','handleUserInteraction','isOpen','locale','ai-no-track-changes','resetConversationTitle','loadSourceResources','reasoningStarted','requires','focusPromptInput','node','setLoadingMessage','ai.chat.models.defaultModelId','ai.availableReplyActions','content','baseVersion','addCurrentDocumentToContext','insertSuggestion','addOperation','full','interactionFinished','stop','AI_CHAT_GENERIC_ERROR','handleRemovedConversation','isCurrentDocumentInConversation','AIConnector','ai-chat-context-file-too-large','removed','createPositionAt','contextItemLoadingEnded','view','getGroupId','selection','Liked\x20response','getRoot','range','addSelectionToChatContext','446031GaKKDa','getDiff','resize','upsertAIChatRating','AI_CHAT_ABORTED_MESSAGE','replies','model','AI_CHAT_CONTEXT_FILE_TOO_LARGE','chat','sourceId','index','Disliked\x20response','filter','AI_BALLOON_HEADER_TITLE','startAutoScroll','accepted','activeConversation','activateTab','populateSourceResourceBalloon','markers','isDocumentOperation','6OkOMxw','resource','streaming','slice','selectModel','source','viewRangeToDom','addUrlToContext','document','getRanges','getSelectionText','19QziyxW','AI_CHAT_UNABLE_TO_START_CONVERSATION','removeSelectionFromContext','setIsMaximized','3014PKFlTH','changes','static','ai-chat-missing-channel-id','contextItem','ai-request-aborted','removeContextItem','updateCapabilities','rejectSuggestion','_setIsMaximized','clearPendingContextUI','rejected','_updateRatings','lastInteraction','_balloonShowDiff','AI_CHAT_CONTEXT_INVALID_DATA','plugins','getInteraction','TrackChanges','TrackChangesEditing','startsWith','_startConversationSafely','uploadProgressChanged','setConversationContext','$graveyard','alignToTop','sourceResourcesLoaded','applySuggestion','_logError','config','createPositionFromPath','_handleUIUserMessage','remove','ai-conversation-','setContextItemLoading','message','afterInit','howMany','replyContentUpdated','redo','isUploadInProgress','partIndex','_batchToChanges','finishInteraction','length','showNext','ai-chat-context-form-data-size-limits-exceeded','parse','updateResourceState','updateFeedItemAIReplySuggestionPartState','_aiChatModels','disableControls','_stopLastInteraction','_previewedChangeGroup','resources','ai-chat-source-resources-load-failed','open','showChangeInText','clearConversationContextUI','anchorId','createRange','marker','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','map','toggleWebSearch','updateConversationTitle','getDocumentData','replyCreated','_aiConnector','104YnMgCe','getFirstRange','setSelectedModel','isStarted','addContextItem','resizeTabs','addDocumentToContext','indexOf','getContentParts','createConversation','current-document','2854RmgUUu','children','history','main','toViewRange','AITabs','getChildren','modification-delta','removeFeedInteraction'];_0x4829=function(){return _0xdb6dd3;};return _0x4829();}export class AIChatController extends _0x168ff1{[_0xf7bdc8(0x2c9)];[_0xf7bdc8(0x282)];[_0xf7bdc8(0x298)];[_0xf7bdc8(0x270)];[_0xf7bdc8(0x268)]=new Map();[_0xf7bdc8(0x273)]=null;[_0xf7bdc8(0x24c)]=!0x1;static get[_0xf7bdc8(0x1fd)](){return[_0xb0fd74,_0x20014a,_0x53c37e];}static get[_0xf7bdc8(0x2a2)](){const _0x27835a=_0xf7bdc8;return _0x27835a(0x18c);}static get[_0xf7bdc8(0x1a4)](){return!0x0;}static get[_0xf7bdc8(0x198)](){return!0x0;}[_0xf7bdc8(0x160)](){const _0x40425e=_0xf7bdc8;this[_0x40425e(0x282)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x20e)),this[_0x40425e(0x298)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x2c5)),this[_0x40425e(0x2c9)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x1e0)),this[_0x40425e(0x270)]=new _0x3dfc6a({'connector':this[_0x40425e(0x282)],'availableModels':this[_0x40425e(0x16c)][_0x40425e(0x25b)][_0x40425e(0x2bb)](_0x40425e(0x1e6)),'defaultModelId':this[_0x40425e(0x16c)][_0x40425e(0x25b)][_0x40425e(0x2bb)](_0x40425e(0x201))});const _0x31cb75=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x293));this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x176),()=>{const _0x3e0953=_0x40425e;this[_0x3e0953(0x253)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x185),(_0x443bcb,_0x51c2ab)=>{const _0x36592e=_0x40425e;this[_0x36592e(0x25d)]({'userMessage':_0x51c2ab});}),this[_0x40425e(0x2b3)](_0x31cb75,_0x40425e(0x1a0),(_0x25d2be,_0x4867b2)=>{const _0x31a7bf=_0x40425e;this[_0x31a7bf(0x247)](_0x4867b2);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x288),()=>{const _0x23a4cb=_0x40425e;_0x31cb75[_0x23a4cb(0x21c)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x17c),async()=>{const _0x3d96c9=_0x40425e;await this[_0x3d96c9(0x272)](),await this[_0x3d96c9(0x2c2)](),this[_0x3d96c9(0x2c4)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x289),()=>{const _0x4ad5bc=_0x40425e;this[_0x4ad5bc(0x22a)]?.[_0x4ad5bc(0x205)](_0x5f46ca(this[_0x4ad5bc(0x16c)][_0x4ad5bc(0x1f8)],_0x4ad5bc(0x2b2)));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1f2),(_0x432a20,_0x433c44)=>{const _0x306cc0=_0x40425e;this[_0x306cc0(0x22a)]?.[_0x306cc0(0x192)](Array[_0x306cc0(0x1e9)](_0x433c44));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x236),(_0x4a8e29,_0x188bc8)=>{const _0x29c4a7=_0x40425e;this[_0x29c4a7(0x22a)]?.[_0x29c4a7(0x236)](_0x188bc8);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1ae),(_0x5f07db,_0x1ef83e)=>{const _0x50f9ae=_0x40425e;this[_0x50f9ae(0x22a)]?.[_0x50f9ae(0x1ae)](_0x1ef83e[_0x50f9ae(0x234)],_0x1ef83e[_0x50f9ae(0x230)]);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x244),(_0x4db313,_0x19b71c)=>{const _0x4c9a44=_0x40425e;this[_0x4c9a44(0x1a9)](_0x19b71c);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1fb),(_0x291351,_0x33b6e8)=>{const _0xe0c88d=_0x40425e;this[_0xe0c88d(0x22a)]?.[_0xe0c88d(0x1fb)](_0x33b6e8[_0xe0c88d(0x223)],_0x33b6e8[_0xe0c88d(0x175)],_0x33b6e8[_0xe0c88d(0x1ea)]);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x27e),()=>{const _0x134267=_0x40425e;this[_0x134267(0x29c)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1ba),()=>{const _0x2a4198=_0x40425e;this[_0x2a4198(0x2a4)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x233),(_0x4d8233,_0x10e86b)=>{const _0x2b2fa2=_0x40425e;this[_0x2b2fa2(0x22a)]?.[_0x2b2fa2(0x16b)](_0x10e86b);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x193),(_0x3163bb,{replyId:_0x2f3fde})=>{const _0x23fa59=_0x40425e;console[_0x23fa59(0x1df)](_0x23fa59(0x216),_0x2f3fde);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x182),(_0x596c95,{replyId:_0x19c6ab})=>{const _0x52c3b7=_0x40425e;console[_0x52c3b7(0x1df)](_0x52c3b7(0x225),_0x19c6ab);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x206),(_0x2028dd,_0x49e962)=>{const _0x31b91a=_0x40425e;this[_0x31b91a(0x16c)][_0x31b91a(0x24e)][_0x31b91a(0x2bb)](_0x20014a)[_0x31b91a(0x18d)](),this[_0x31b91a(0x1ef)](_0x49e962);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x277),(_0x1f5639,{replyId:_0x79e92,partIndex:_0x10f622})=>{const _0x36f926=_0x40425e;this[_0x36f926(0x24c)]=this[_0x36f926(0x298)][_0x36f926(0x1f4)],this[_0x36f926(0x1e8)](_0x79e92,_0x10f622);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1be),(_0x44d469,{replyId:_0x3e9e86,partIndex:_0x143161})=>{const _0x276152=_0x40425e,_0x377b75=this[_0x276152(0x172)](_0x3e9e86,_0x143161);_0x377b75&&_0x276152(0x256)!=_0x377b75[_0x276152(0x218)][_0x276152(0x2ad)][_0x276152(0x17f)]&&this[_0x276152(0x2c9)][_0x276152(0x15f)]([_0x377b75[_0x276152(0x218)]],_0x276152(0x2b8));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x171),()=>{const _0x175111=_0x40425e;this[_0x175111(0x2c9)][_0x175111(0x1ed)](_0x175111(0x2b8));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x259),(_0x25bcb3,_0x5e9ec1)=>{const _0xdd2829=_0x40425e;this[_0xdd2829(0x16c)][_0xdd2829(0x24e)][_0xdd2829(0x2bb)](_0x20014a)[_0xdd2829(0x18d)](),this[_0xdd2829(0x16d)](_0x5e9ec1);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x19e),async(_0x597aa7,{replyId:_0x4de7a2,showDiff:_0xbe4734})=>{const _0x40dce3=_0x40425e,{reply:_0x520494}=this[_0x40dce3(0x162)](_0x4de7a2),_0x1f83a5=_0x520494[_0x40dce3(0x28b)]({'showDiff':_0xbe4734});await this[_0x40dce3(0x298)][_0x40dce3(0x1d0)]({'id':_0x520494['id'],'parts':_0x1f83a5,'renderingStrategy':_0x40dce3(0x240)});}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x246),(_0xce23f4,{replyId:_0x2368d2,partIndex:_0x5cd4c8})=>{const _0x20ae8b=_0x40425e;this[_0x20ae8b(0x273)]?.[_0x20ae8b(0x2ae)]==_0x2368d2&&this[_0x20ae8b(0x273)]?.[_0x20ae8b(0x267)]==_0x5cd4c8&&this[_0x20ae8b(0x16c)][_0x20ae8b(0x24e)][_0x20ae8b(0x2bb)](_0x20014a)[_0x20ae8b(0x18d)]();const {reply:_0x4be6ae}=this[_0x20ae8b(0x162)](_0x2368d2);_0x4be6ae[_0x20ae8b(0x2cb)](_0x5cd4c8,_0x20ae8b(0x249)),this[_0x20ae8b(0x2c9)][_0x20ae8b(0x1ed)](_0x20ae8b(0x2b8));});}async[_0xf7bdc8(0x262)](){const _0x4de10e=_0xf7bdc8;this[_0x4de10e(0x16c)]instanceof _0x2b4142?this[_0x4de10e(0x1aa)](this[_0x4de10e(0x16c)]):this[_0x4de10e(0x2b3)](this[_0x4de10e(0x16c)][_0x4de10e(0x183)],_0x4de10e(0x2be),(_0x283729,_0x5c2713)=>{const _0x3ee492=_0x4de10e;_0x5c2713['on'](_0x3ee492(0x177),()=>{const _0x17df2f=_0x3ee492;this[_0x17df2f(0x1aa)](_0x5c2713);});}),await this[_0x4de10e(0x253)]();}[_0xf7bdc8(0x1ef)](_0x64cceb){const _0x270dc8=_0xf7bdc8,_0x492d5b=_0x554683(this[_0x270dc8(0x16c)]);if(!_0x492d5b[_0x270dc8(0x24e)][_0x270dc8(0x196)](_0x270dc8(0x250)))throw new _0x217c5a(_0x270dc8(0x1f9),null);const _0x503cdc=this[_0x270dc8(0x16c)][_0x270dc8(0x24e)][_0x270dc8(0x2bb)](_0x270dc8(0x17e)),{reply:_0x23aa7f,interaction:_0x3550b5}=this[_0x270dc8(0x162)](_0x64cceb[_0x270dc8(0x2ae)]),_0x569668=this[_0x270dc8(0x172)](_0x64cceb[_0x270dc8(0x2ae)],_0x64cceb[_0x270dc8(0x267)]),_0x31f34c=void 0x0!==_0x64cceb[_0x270dc8(0x267)]?[_0x23aa7f[_0x270dc8(0x1d2)][_0x64cceb[_0x270dc8(0x267)]]]:_0x23aa7f[_0x270dc8(0x1d2)][_0x270dc8(0x226)](_0x26576f=>_0x270dc8(0x1a1)==_0x26576f[_0x270dc8(0x1c4)]),_0x5825e0=_0x31f34c[_0x270dc8(0x27d)](_0x5c27bb=>_0x23aa7f[_0x270dc8(0x1d2)][_0x270dc8(0x28a)](_0x5c27bb));if(!_0x569668||_0x270dc8(0x256)==_0x569668[_0x270dc8(0x218)][_0x270dc8(0x2ad)][_0x270dc8(0x17f)])return void _0x5825e0[_0x270dc8(0x1d9)](_0x5de2ed=>_0x23aa7f[_0x270dc8(0x2cb)](_0x5de2ed,_0x270dc8(0x19a)));_0x5825e0[_0x270dc8(0x1d9)](_0x501186=>_0x23aa7f[_0x270dc8(0x2cb)](_0x501186,_0x270dc8(0x229)));const _0x477936=_0x54130d({'editor':_0x492d5b,'reply':_0x23aa7f,'interaction':_0x3550b5,'groups':_0x31f34c,'transform':!0x0,'documentCompare':_0x503cdc,'documentCompareOptions':{'anchor':_0x270dc8(0x291),'markDeletions':!0x0}});let _0x4528a9;_0x569668&&this[_0x270dc8(0x1b6)](_0x569668[_0x270dc8(0x218)]),_0x492d5b[_0x270dc8(0x220)][_0x270dc8(0x2a5)](_0x33c84f=>{const _0x5af810=_0x270dc8;_0x4528a9=_0x33c84f[_0x5af810(0x29e)],_0x492d5b[_0x5af810(0x24e)][_0x5af810(0x2bb)](_0x5af810(0x251))[_0x5af810(0x2b1)](_0x477936),this[_0x5af810(0x2c9)][_0x5af810(0x1ed)](_0x5af810(0x2b8));}),this[_0x270dc8(0x268)][_0x270dc8(0x2bf)](_0x4528a9,{'interactionId':_0x3550b5['id'],'replyId':_0x23aa7f['id'],'indexes':_0x5825e0[_0x270dc8(0x232)]()}),this[_0x270dc8(0x24a)](_0x23aa7f);}[_0xf7bdc8(0x16d)](_0x29ee8d){const _0x411cac=_0xf7bdc8,_0x1efa7f=_0x554683(this[_0x411cac(0x16c)]),_0x3c2284=this[_0x411cac(0x16c)][_0x411cac(0x24e)][_0x411cac(0x2bb)](_0x53c37e),{reply:_0x255b7d,interaction:_0x5716ec}=this[_0x411cac(0x162)](_0x29ee8d[_0x411cac(0x2ae)]),_0xb53f89=this[_0x411cac(0x172)](_0x29ee8d[_0x411cac(0x2ae)],_0x29ee8d[_0x411cac(0x267)]),_0x1a8296=void 0x0!==_0x29ee8d[_0x411cac(0x267)]?[_0x255b7d[_0x411cac(0x1d2)][_0x29ee8d[_0x411cac(0x267)]]]:_0x255b7d[_0x411cac(0x1d2)][_0x411cac(0x226)](_0x3290bb=>_0x411cac(0x1a1)==_0x3290bb[_0x411cac(0x1c4)]),_0x23010a=_0x1a8296[_0x411cac(0x27d)](_0xd6adb1=>_0x255b7d[_0x411cac(0x1d2)][_0x411cac(0x28a)](_0xd6adb1));if(!_0xb53f89||_0x411cac(0x256)==_0xb53f89[_0x411cac(0x218)][_0x411cac(0x2ad)][_0x411cac(0x17f)])return void _0x23010a[_0x411cac(0x1d9)](_0x3032c9=>_0x255b7d[_0x411cac(0x2cb)](_0x3032c9,_0x411cac(0x19a)));_0x23010a[_0x411cac(0x1d9)](_0x2f45cd=>_0x255b7d[_0x411cac(0x2cb)](_0x2f45cd,_0x411cac(0x229)));const _0x473d6e=_0x54130d({'editor':_0x1efa7f,'reply':_0x255b7d,'interaction':_0x5716ec,'groups':_0x1a8296,'transform':!0x0,'documentCompare':_0x3c2284,'documentCompareOptions':{'anchor':_0x411cac(0x291),'markDeletions':!0x1}});let _0x2b9ed1;_0xb53f89&&this[_0x411cac(0x1b6)](_0xb53f89[_0x411cac(0x218)]),_0x1efa7f[_0x411cac(0x220)][_0x411cac(0x2a5)](_0x29ee19=>{const _0x5b305d=_0x411cac;_0x2b9ed1=_0x29ee19[_0x5b305d(0x29e)];for(const _0x386b54 of _0x473d6e)_0x386b54[_0x5b305d(0x204)]=_0x1efa7f[_0x5b305d(0x220)][_0x5b305d(0x237)][_0x5b305d(0x2a8)],_0x5bcc09(_0x1efa7f,_0x386b54),_0x29ee19[_0x5b305d(0x29e)][_0x5b305d(0x207)](_0x386b54),_0x1efa7f[_0x5b305d(0x220)][_0x5b305d(0x1e2)](_0x386b54);}),this[_0x411cac(0x268)][_0x411cac(0x2bf)](_0x2b9ed1,{'interactionId':_0x5716ec['id'],'replyId':_0x255b7d['id'],'indexes':_0x23010a[_0x411cac(0x232)]()}),this[_0x411cac(0x24a)](_0x255b7d);}[_0xf7bdc8(0x1e8)](_0x12e38d,_0x15b42c){const _0x522b72=_0xf7bdc8,_0x16d57f=_0x554683(this[_0x522b72(0x16c)]),_0xcd3514=this[_0x522b72(0x172)](_0x12e38d,_0x15b42c),_0x3d966a=this[_0x522b72(0x16c)][_0x522b72(0x24e)][_0x522b72(0x2bb)](_0x20014a);if(!_0xcd3514)return void _0x3d966a[_0x522b72(0x18d)]();const {range:_0xceeead,currentIndex:_0x1e57f5}=_0xcd3514;if(_0x522b72(0x256)==_0xceeead[_0x522b72(0x2ad)][_0x522b72(0x17f)]){const {reply:_0x1fcfad}=this[_0x522b72(0x162)](_0x12e38d);return _0x1fcfad[_0x522b72(0x2cb)](_0x1e57f5,_0x522b72(0x19a)),void _0x3d966a[_0x522b72(0x18d)]();}if(this[_0x522b72(0x273)]?.[_0x522b72(0x2ae)]==_0x12e38d&&this[_0x522b72(0x273)]?.[_0x522b72(0x267)]==_0x1e57f5)return;this[_0x522b72(0x1ec)](_0x3d966a),this[_0x522b72(0x273)]={'replyId':_0x12e38d,'partIndex':_0x1e57f5};let _0x423c1e=_0x16d57f[_0x522b72(0x25b)][_0x522b72(0x2bb)](_0x522b72(0x202))||[..._0x419f44];_0x16d57f[_0x522b72(0x24e)][_0x522b72(0x196)](_0x522b72(0x250))||(_0x423c1e=_0x423c1e[_0x522b72(0x226)](_0x35a382=>_0x522b72(0x206)!=_0x35a382));const _0x385af0=new _0x5e7af4(_0x16d57f[_0x522b72(0x1f8)],{'showDiff':this[_0x522b72(0x24c)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x522b72(0x208)},'hideHeader':!0x0,'availableActions':_0x423c1e});this[_0x522b72(0x1ec)](_0x385af0);const {reply:_0x531f66}=this[_0x522b72(0x162)](_0x12e38d),_0x4fb353=_0x531f66[_0x522b72(0x28b)]({'showDiff':this[_0x522b72(0x24c)]})[_0x522b72(0x226)](_0x1f3964=>_0x1f3964[_0x522b72(0x1d8)]),_0x10cf03=_0x4fb353[_0x522b72(0x173)](_0x81aee7=>_0x81aee7[_0x522b72(0x224)]==_0x1e57f5);if(-0x1==_0x10cf03)return;const _0x478b07=_0x4fb353[_0x10cf03],_0x4214fb=_0x4fb353['at']((_0x10cf03-0x1)%_0x4fb353[_0x522b72(0x26a)])?.[_0x522b72(0x224)],_0x5a07cb=_0x4fb353['at']((_0x10cf03+0x1)%_0x4fb353[_0x522b72(0x26a)])?.[_0x522b72(0x224)];_0x385af0[_0x522b72(0x184)]({'parts':[_0x478b07],'renderingStrategy':_0x522b72(0x240)});const _0x2b5ba0=_0x1e57f5!==_0x4214fb;this[_0x522b72(0x1b6)](_0xceeead,!0x0),_0x3d966a[_0x522b72(0x276)]({'index':_0x1e57f5,'title':_0x5f46ca(this[_0x522b72(0x16c)][_0x522b72(0x1f8)],_0x522b72(0x227),(_0x10cf03+0x1)[_0x522b72(0x191)]()),'icon':_0x477ad5,'mainView':_0x385af0,'showRotator':_0x2b5ba0,'showApplyButton':!0x0,'showSuggestButton':_0x16d57f[_0x522b72(0x24e)][_0x522b72(0x196)](_0x522b72(0x250)),'ranges':[_0xceeead]}),this[_0x522b72(0x298)][_0x522b72(0x1a7)](_0x12e38d,_0x1e57f5),this[_0x522b72(0x2b3)](_0x385af0,_0x522b72(0x19e),(_0x5f9c0f,{showDiff:_0x5351b9})=>{const _0x2e2fbb=_0x522b72;this[_0x2e2fbb(0x24c)]=_0x5351b9;const {reply:_0x59c3d9}=this[_0x2e2fbb(0x162)](_0x12e38d),_0x51e380=_0x59c3d9[_0x2e2fbb(0x28b)]({'showDiff':_0x5351b9,'groupIndex':_0x1e57f5});_0x385af0[_0x2e2fbb(0x184)]({'parts':_0x51e380,'renderingStrategy':_0x2e2fbb(0x240)});}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x259),()=>{const _0x1da485=_0x522b72;this[_0x1da485(0x16d)]({'replyId':_0x12e38d,'partIndex':_0x1e57f5}),_0x2b5ba0?this[_0x1da485(0x1e8)](_0x12e38d,_0x5a07cb):_0x3d966a[_0x1da485(0x18d)]();}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x206),()=>{const _0x2a616f=_0x522b72;this[_0x2a616f(0x1ef)]({'replyId':_0x12e38d,'partIndex':_0x1e57f5}),_0x2b5ba0?this[_0x2a616f(0x1e8)](_0x12e38d,_0x5a07cb):_0x3d966a[_0x2a616f(0x18d)]();}),_0x2b5ba0&&(this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x26b),()=>{const _0x17a609=_0x522b72;this[_0x17a609(0x1e8)](_0x12e38d,_0x5a07cb);}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x1d5),()=>{const _0x358df5=_0x522b72;this[_0x358df5(0x1e8)](_0x12e38d,_0x4214fb);})),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x1b8),()=>{const _0xdc7636=_0x522b72;this[_0xdc7636(0x1ec)](_0x3d966a),this[_0xdc7636(0x1ec)](_0x385af0),this[_0xdc7636(0x273)]=null;});}[_0xf7bdc8(0x172)](_0x5b4f33,_0x331d55){const _0x569878=_0xf7bdc8,_0x3c6494=_0x554683(this[_0x569878(0x16c)]),{reply:_0x17dba8,interaction:_0x2186ca}=this[_0x569878(0x162)](_0x5b4f33),_0x2fd60f=_0x17dba8[_0x569878(0x1d2)][_0x569878(0x226)](_0x5eaa2a=>_0x569878(0x1a1)==_0x5eaa2a[_0x569878(0x1c4)]),_0xd17896=_0x2fd60f[_0x569878(0x27d)](_0x306013=>_0x17dba8[_0x569878(0x1d2)][_0x569878(0x28a)](_0x306013));void 0x0===_0x331d55&&(_0x331d55=_0xd17896[0x0]);const _0x438754=_0xd17896[_0x569878(0x28a)](_0x331d55);if(-0x1==_0x438754)return null;const _0x502beb=_0x2fd60f[_0x438754],_0x23ef95=new _0x48ab8a([]),_0x468f51=new _0x48ab8a([]);for(const _0x588745 of _0x502beb[_0x569878(0x23f)])if(_0x569878(0x210)!=_0x588745[_0x569878(0x180)]&&_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0x588745[_0x569878(0x1ff)][_0x569878(0x18f)](!0x0)),_0x569878(0x1de)!=_0x588745[_0x569878(0x180)]){const _0x51c81c=_0x262c1(_0x146710=>_0x3e07fb(_0x146710,_0x569878(0x17d))==_0x588745['id'],_0x17dba8[_0x569878(0x1cf)],!0x0);_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0x51c81c[_0x569878(0x18f)](!0x0));}if(0x0==_0x23ef95[_0x569878(0x28f)][_0x569878(0x26a)]){if(_0x502beb[_0x569878(0x23f)][0x0][_0x569878(0x279)]){const _0x17bc4f=_0x405389(_0x569878(0x17d),_0x502beb[_0x569878(0x23f)][0x0][_0x569878(0x279)],_0x17dba8[_0x569878(0x1cf)]);_0x23ef95[_0x569878(0x28f)][_0x569878(0x2bc)](_0x17bc4f[_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x2bc)](_0x17bc4f[_0x569878(0x18f)](!0x0)),_0x17bc4f[_0x569878(0x1a8)]&&(_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0x17bc4f[_0x569878(0x1a8)][_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0x17bc4f[_0x569878(0x1a8)][_0x569878(0x18f)](!0x0)));}else{const _0xd5e2de=_0x17dba8[_0x569878(0x1cf)][_0x569878(0x28f)][0x0];if(!_0xd5e2de)return null;_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0xd5e2de[_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0xd5e2de[_0x569878(0x18f)](!0x0));}}const _0x1c14b0=_0x2186ca[_0x569878(0x1b1)](),_0x3ded59=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x1c14b0[_0x569878(0x203)]),_0x4c0ae6=_0x1c4235(_0x23ef95),_0x4e0bd5=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x4c0ae6),_0x5e7703=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x4c0ae6),_0xf8fb84=_0x3c6494[_0x569878(0x220)][_0x569878(0x211)](_0x4e0bd5,0x0),_0x506981=_0x1c4235(_0x468f51),_0x5859e7={'anchor':_0xf8fb84,'markDeletions':!0x1},_0x1b9bc5=_0x3c6494[_0x569878(0x24e)][_0x569878(0x2bb)](_0x53c37e)[_0x569878(0x21b)](_0x4c0ae6,_0x506981,_0x5859e7)[_0x569878(0x1a6)]();if(!_0x1b9bc5[_0x569878(0x26a)])return null;_0x3c6494[_0x569878(0x220)][_0x569878(0x2a5)](_0x2e914c=>{const _0x239106=_0x569878;for(const _0x23584a of _0x1b9bc5)if(_0x239106(0x25e)==_0x23584a[_0x239106(0x180)]){const _0x31bafe=_0x23584a[_0x239106(0x1ce)],_0x26a13a=_0x23584a[_0x239106(0x263)],_0xa4e81a=new _0x1a206a(_0x31bafe,_0x26a13a);_0x2e914c[_0x239106(0x29e)][_0x239106(0x207)](_0xa4e81a),_0x3c6494[_0x239106(0x220)][_0x239106(0x1e2)](_0xa4e81a);}else _0x239106(0x27b)!==_0x23584a[_0x239106(0x180)]&&(_0x23584a[_0x239106(0x204)]=null,_0x23584a[_0x239106(0x22e)]=!0x1,_0x2e914c[_0x239106(0x29e)][_0x239106(0x207)](_0x23584a),_0x3c6494[_0x239106(0x220)][_0x239106(0x1e2)](_0x23584a));});const _0x1dab38=_0x5be61d(_0x3c6494,_0x1b9bc5,_0x4e0bd5);_0x2ca72d(_0x3c6494[_0x569878(0x220)],_0x1dab38);const _0x380359=_0x1dab38[_0x569878(0x284)]()[_0x569878(0x194)][_0x569878(0x164)][_0x569878(0x232)](),_0x3ecb8a=_0x1dab38[_0x569878(0x284)]()[_0x569878(0x1d3)][_0x569878(0x164)][_0x569878(0x232)](),_0x279f64=[];let _0x44002f=_0x4e0bd5,_0x41c6dd=_0x5e7703;for(let _0x3bdc16=0x0;_0x3bdc16<_0x3ecb8a[_0x569878(0x26a)];_0x3bdc16++){const _0xee5f4d=_0x44002f[_0x569878(0x1e3)]-_0x3ecb8a[_0x3bdc16];_0x279f64[_0x3bdc16]=_0x41c6dd[_0x569878(0x1e3)]-_0xee5f4d,_0x44002f=_0x44002f[_0x569878(0x1b0)](_0x3ecb8a[_0x3bdc16]),_0x41c6dd=_0x41c6dd[_0x569878(0x1b0)](_0x279f64[_0x3bdc16]);}const _0x30850e=_0x3c6494[_0x569878(0x220)][_0x569878(0x27a)](_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x5e7703,_0x380359),_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x5e7703,_0x279f64)),_0x46ca75=_0x5e7703[_0x569878(0x179)](0x0)[_0x569878(0x178)](_0x230da6),_0x32caf8=Array[_0x569878(0x1e9)](_0x3ded59[_0x569878(0x294)]())[_0x569878(0x1d6)](_0x3549b5=>_0x3549b5[_0x569878(0x178)](_0x230da6)==_0x46ca75)[_0x569878(0x187)](),_0x58496c=_0x30850e[_0x569878(0x194)][_0x569878(0x164)][_0x569878(0x232)](),_0x194d67=_0x30850e[_0x569878(0x1d3)][_0x569878(0x164)][_0x569878(0x232)]();_0x58496c[0x0]=_0x32caf8[0x0]+_0x58496c[0x0],_0x194d67[0x0]=_0x32caf8[0x0]+_0x194d67[0x0];let _0x41f700=_0x3c6494[_0x569878(0x220)][_0x569878(0x27a)](_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x217)](),_0x58496c),_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x217)](),_0x194d67));const _0x4a1f5e=_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x290)][_0x569878(0x1a6)](_0x1c14b0[_0x569878(0x2a8)]);for(const _0xcdf7f8 of _0x4a1f5e)_0x41f700=_0xcfb78[_0x569878(0x1da)](_0x41f700[_0x569878(0x17b)](_0xcdf7f8));return{'range':_0x41f700,'currentIndex':_0x331d55};}[_0xf7bdc8(0x1aa)](_0x2e07dd){const _0x2443e0=_0xf7bdc8;if(!_0x2e07dd[_0x2443e0(0x24e)][_0x2443e0(0x196)](_0x2443e0(0x1ee)))return;const _0x5aa801=_0x2e07dd[_0x2443e0(0x2b0)][_0x2443e0(0x2bb)](_0x2443e0(0x2a3)),_0x3e0ea6=_0x2e07dd[_0x2443e0(0x2b0)][_0x2443e0(0x2bb)](_0x2443e0(0x265));this[_0x2443e0(0x2b3)](_0x5aa801,_0x2443e0(0x174),(_0x479db6,_0x3460d4,_0x4bee7d)=>{const _0x3267c4=_0x2443e0,_0x48b7cc=this[_0x3267c4(0x268)][_0x3267c4(0x2bb)](_0x3460d4);if(!_0x48b7cc)return;const _0x21a65d=this[_0x3267c4(0x22a)][_0x3267c4(0x24f)](_0x48b7cc[_0x3267c4(0x1f3)])[_0x3267c4(0x1c0)](_0x48b7cc[_0x3267c4(0x2ae)]);_0x48b7cc[_0x3267c4(0x195)][_0x3267c4(0x1d9)](_0x124ffb=>_0x21a65d[_0x3267c4(0x2cb)](_0x124ffb,_0x3267c4(0x1a1))),this[_0x3267c4(0x268)][_0x3267c4(0x1b4)](_0x3460d4),this[_0x3267c4(0x268)][_0x3267c4(0x2bf)](_0x4bee7d,_0x48b7cc);}),this[_0x2443e0(0x2b3)](_0x3e0ea6,_0x2443e0(0x174),(_0x3df2d8,_0xacc5d0,_0x485acd)=>{const _0x7274da=_0x2443e0,_0x35bff1=this[_0x7274da(0x268)][_0x7274da(0x2bb)](_0xacc5d0);if(!_0x35bff1)return;const _0x153fb6=this[_0x7274da(0x22a)][_0x7274da(0x24f)](_0x35bff1[_0x7274da(0x1f3)])[_0x7274da(0x1c0)](_0x35bff1[_0x7274da(0x2ae)]);_0x35bff1[_0x7274da(0x195)][_0x7274da(0x1d9)](_0x146fc1=>_0x153fb6[_0x7274da(0x2cb)](_0x146fc1,_0x7274da(0x229))),this[_0x7274da(0x268)][_0x7274da(0x1b4)](_0xacc5d0),this[_0x7274da(0x268)][_0x7274da(0x2bf)](_0x485acd,_0x35bff1);});}async[_0xf7bdc8(0x2a0)](_0x21cf33){const _0x494736=_0xf7bdc8;this[_0x494736(0x16c)][_0x494736(0x24e)][_0x494736(0x2bb)](_0x20014a)[_0x494736(0x18d)](),this[_0x494736(0x298)][_0x494736(0x1f0)](_0x494736(0x240)),this[_0x494736(0x298)][_0x494736(0x1db)](!0x0),await this[_0x494736(0x272)]();try{await this[_0x494736(0x282)][_0x494736(0x1cd)](_0x21cf33)[_0x494736(0x2aa)](),await this[_0x494736(0x253)](_0x21cf33),this[_0x494736(0x27f)]('\x20');const {sessionId:_0x7be23}=this[_0x494736(0x2c9)][_0x494736(0x280)]();await this[_0x494736(0x22a)][_0x494736(0x1f1)](_0x21cf33,_0x7be23),this[_0x494736(0x22a)][_0x494736(0x20d)]()&&this[_0x494736(0x22a)][_0x494736(0x205)](_0x5f46ca(this[_0x494736(0x16c)][_0x494736(0x1f8)],_0x494736(0x2b2)));}catch(_0x2a59e9){this[_0x494736(0x298)][_0x494736(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x494736(0x16c)][_0x494736(0x1f8)],_0x494736(0x19f)),'id':_0x21cf33}),this[_0x494736(0x25a)](new _0x217c5a(_0x494736(0x29d),this,{'error':_0x2a59e9}));}finally{this[_0x494736(0x16c)][_0x494736(0x24e)][_0x494736(0x2bb)](_0x4f4427)[_0x494736(0x213)][_0x494736(0x22b)](_0x494736(0x222)),this[_0x494736(0x298)][_0x494736(0x228)](),this[_0x494736(0x298)][_0x494736(0x1f0)](_0x494736(0x231)),this[_0x494736(0x298)][_0x494736(0x1db)](!0x1);}}[_0xf7bdc8(0x20c)](_0x4a7394){const _0x4d8951=_0xf7bdc8;this[_0x4d8951(0x22a)]['id']===_0x4a7394&&this[_0x4d8951(0x253)]();}async[_0xf7bdc8(0x219)](){const _0x5b7932=_0xf7bdc8,_0x90b566=this[_0x5b7932(0x2c9)][_0x5b7932(0x239)]();this[_0x5b7932(0x22a)]?.[_0x5b7932(0x170)](_0x90b566),this[_0x5b7932(0x22a)]?.[_0x5b7932(0x205)](_0x5f46ca(this[_0x5b7932(0x16c)][_0x5b7932(0x1f8)],_0x5b7932(0x2b2)));}[_0xf7bdc8(0x2c4)](){const _0x26c05a=_0xf7bdc8;this[_0x26c05a(0x22a)]?.[_0x26c05a(0x23c)]();}[_0xf7bdc8(0x1fe)](){const _0x4e2334=_0xf7bdc8;this[_0x4e2334(0x298)][_0x4e2334(0x1fe)]();}async[_0xf7bdc8(0x176)](){const _0x547058=_0xf7bdc8;await this[_0x547058(0x253)]();}async[_0xf7bdc8(0x2af)]({message:_0xec70f9,quickActionData:_0x3f4ac9}){const _0x817bd6=_0xf7bdc8;await this[_0x817bd6(0x25d)]({'userMessage':_0xec70f9,'quickActionData':_0x3f4ac9});}[_0xf7bdc8(0x214)](){const _0x4e18c3=_0xf7bdc8,_0xaa3607=this[_0x4e18c3(0x16c)][_0x4e18c3(0x25b)][_0x4e18c3(0x2bb)](_0x4e18c3(0x2ca));if(!_0xaa3607)throw new _0x217c5a(_0x4e18c3(0x241),this);return _0xaa3607;}async[_0xf7bdc8(0x253)](_0xa73a55){const _0x4b9de8=_0xf7bdc8;try{this[_0x4b9de8(0x298)][_0x4b9de8(0x1cb)](),await this[_0x4b9de8(0x197)](_0xa73a55);}catch(_0x354a23){this[_0x4b9de8(0x298)][_0x4b9de8(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x4b9de8(0x16c)][_0x4b9de8(0x1f8)],_0x4b9de8(0x23b)),'id':_0xa73a55||_0x532b26()}),console[_0x4b9de8(0x2ba)](_0x354a23),this[_0x4b9de8(0x22a)]=void 0x0,this[_0x4b9de8(0x298)][_0x4b9de8(0x271)]();}}async[_0xf7bdc8(0x197)](_0x5ddf43){const _0x1923d8=_0xf7bdc8,_0x51c89b=this[_0x1923d8(0x16c)][_0x1923d8(0x24e)][_0x1923d8(0x2bb)](_0x20014a);let _0x216f5e;_0x51c89b[_0x1923d8(0x1f7)]&&_0x51c89b[_0x1923d8(0x18d)](),_0x5ddf43||!this[_0x1923d8(0x22a)]?_0x216f5e=this[_0x1923d8(0x16c)][_0x1923d8(0x25b)][_0x1923d8(0x2bb)](_0x1923d8(0x201)):this[_0x1923d8(0x298)][_0x1923d8(0x2b9)]&&(_0x216f5e=this[_0x1923d8(0x22a)][_0x1923d8(0x1bc)]['id']),await this[_0x1923d8(0x272)]();const _0x575cae=this[_0x1923d8(0x214)](),_0x157ced=_0x5ddf43||_0x532b26();this[_0x1923d8(0x22a)]=new _0x208493({'connector':this[_0x1923d8(0x282)],'chatModels':this[_0x1923d8(0x270)],'selectedModelId':_0x216f5e,'conversationId':_0x157ced,'group':_0x575cae,'getEditor':()=>_0x554683(this[_0x1923d8(0x16c)])}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1af),(_0x1f5c86,_0x350bed)=>{const _0x4ff60c=_0x1923d8;this[_0x4ff60c(0x298)][_0x4ff60c(0x28c)](_0x350bed),this[_0x4ff60c(0x298)][_0x4ff60c(0x1c8)](),this[_0x4ff60c(0x298)][_0x4ff60c(0x248)](),this[_0x4ff60c(0x298)][_0x4ff60c(0x278)](),_0x5ddf43||(this[_0x4ff60c(0x298)][_0x4ff60c(0x1fa)](),this[_0x4ff60c(0x22a)]?.[_0x4ff60c(0x205)](_0x5f46ca(this[_0x4ff60c(0x16c)][_0x4ff60c(0x1f8)],_0x4ff60c(0x2b2))));}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x254),(_0x84b101,_0x53aebb)=>{const _0x1f2a9f=_0x1923d8;this[_0x1f2a9f(0x298)][_0x1f2a9f(0x2b6)](_0x53aebb[_0x1f2a9f(0x266)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x166),(_0x2b04f7,_0x9f9436)=>{const _0x37a09b=_0x1923d8;this[_0x37a09b(0x298)][_0x37a09b(0x1b9)](_0x9f9436);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x167),()=>{const _0x18f348=_0x1923d8;this[_0x18f348(0x298)][_0x18f348(0x200)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1fc),()=>{const _0x1b3c39=_0x1923d8;this[_0x1b3c39(0x298)][_0x1b3c39(0x200)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1c1),(_0xb892e2,_0x6fa17d)=>{const _0x20c793=_0x1923d8;this[_0x20c793(0x298)][_0x20c793(0x190)](_0x6fa17d,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c3),(_0xfc980b,_0x42a3be)=>{const _0x6f4b46=_0x1923d8;this[_0x6f4b46(0x298)][_0x6f4b46(0x190)](_0x42a3be,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x16a),()=>{const _0x49b8af=_0x1923d8;this[_0x49b8af(0x298)][_0x49b8af(0x1f5)]();}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x209),async()=>{const _0x139d10=_0x1923d8;await this[_0x139d10(0x298)][_0x139d10(0x269)]();}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2ac),(_0x1dfc29,_0x2d0f94)=>{const _0x20e0e4=_0x1923d8;this[_0x20e0e4(0x298)][_0x20e0e4(0x296)](_0x2d0f94['id']);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c6),(_0x56216c,_0x342504,_0x5d0c53)=>{const _0x2ab97d=_0x1923d8;this[_0x2ab97d(0x27f)](_0x342504,_0x5d0c53);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x281),(_0x69d1ae,_0x23787c)=>{const _0x1cd884=_0x1923d8;_0x1cd884(0x2c8)===_0x23787c[_0x1cd884(0x180)]?this[_0x1cd884(0x298)][_0x1cd884(0x299)](_0x23787c):this[_0x1cd884(0x298)][_0x1cd884(0x1c3)](_0x23787c);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x264),async(_0x2ef82d,_0x153da3)=>{const _0x1ec96e=_0x1923d8;await this[_0x1ec96e(0x2b5)]({'reply':_0x153da3});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x189),(_0x55bb5d,{reply:_0x4c3e9f,index:_0x25f1a9,state:_0x197658})=>{const _0x2c3b0f=_0x1923d8;this[_0x2c3b0f(0x298)][_0x2c3b0f(0x26f)]({'id':_0x4c3e9f['id'],'index':_0x25f1a9,'state':_0x197658});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x29b),(_0x1423eb,_0x11e537)=>{const _0x415cca=_0x1923d8;if(this[_0x415cca(0x298)][_0x415cca(0x287)](_0x11e537[_0x415cca(0x242)],_0x11e537[_0x415cca(0x1d7)]),_0x415cca(0x215)===_0x11e537[_0x415cca(0x242)][_0x415cca(0x180)]){const _0x29956b=[..._0x554683(this[_0x415cca(0x16c)])[_0x415cca(0x220)][_0x415cca(0x237)][_0x415cca(0x215)][_0x415cca(0x238)]()];this[_0x415cca(0x2c9)][_0x415cca(0x15f)](_0x29956b,_0x415cca(0x25f)+this[_0x415cca(0x22a)]?.['id']);}}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x16e),(_0x2bb317,_0x4863d1)=>{const _0x353e9c=_0x1923d8;this[_0x353e9c(0x298)][_0x353e9c(0x244)](_0x4863d1[_0x353e9c(0x29a)]),_0x353e9c(0x28d)==_0x4863d1[_0x353e9c(0x29a)]&&this[_0x353e9c(0x2c4)](),_0x353e9c(0x215)===_0x4863d1[_0x353e9c(0x180)]&&this[_0x353e9c(0x2c9)][_0x353e9c(0x1ed)](_0x353e9c(0x25f)+this[_0x353e9c(0x22a)]?.['id']);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x212),(_0x1795c2,_0x380a2a)=>{const _0x462daa=_0x1923d8;this[_0x462daa(0x298)][_0x462daa(0x260)](_0x380a2a[_0x462daa(0x242)][_0x462daa(0x29a)],_0x380a2a[_0x462daa(0x1d7)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1c6),(_0x534ffa,_0x30d29d)=>{const _0x336a66=_0x1923d8;this[_0x336a66(0x298)][_0x336a66(0x255)](_0x30d29d[_0x336a66(0x2b7)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1b3),(_0x5d18d8,_0x5cb41a)=>{const _0x9ec1a8=_0x1923d8;this[_0x9ec1a8(0x298)][_0x9ec1a8(0x1c5)](_0x5cb41a[_0x9ec1a8(0x1c2)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x258),(_0x692211,_0x3f2a13)=>{const _0x5a9bc9=_0x1923d8;this[_0x5a9bc9(0x298)][_0x5a9bc9(0x22c)](_0x3f2a13[_0x5a9bc9(0x223)],_0x3f2a13[_0x5a9bc9(0x234)],_0x3f2a13[_0x5a9bc9(0x274)],_0x3f2a13[_0x5a9bc9(0x1ea)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2a6),(_0x48c5ed,_0x3a0668)=>{const _0x410db9=_0x1923d8;this[_0x410db9(0x298)][_0x410db9(0x26e)](_0x3a0668[_0x410db9(0x223)],_0x3a0668[_0x410db9(0x1ad)],_0x3a0668[_0x410db9(0x17a)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c1),(_0x7c6df4,_0x3e4498)=>{const _0x59259e=_0x1923d8;this[_0x59259e(0x298)][_0x59259e(0x245)](_0x3e4498);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x199),(_0x1dcc04,_0xffc481)=>{const _0xa45c2b=_0x1923d8;this[_0xa45c2b(0x298)][_0xa45c2b(0x285)](_0xffc481[_0xa45c2b(0x1bc)],_0xffc481[_0xa45c2b(0x2a1)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2ba),(_0x13e5a4,{error:_0x2106e1,interactionId:_0x14bef7,fileName:_0x391b26,url:_0x3f424a,sourceId:_0x3c1e83,sourceLabel:_0x54726e})=>{const _0x212771=_0x1923d8,_0x3e313a=_0x14bef7?_0x14bef7+':'+_0x532b26():_0x532b26();_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x243))?this[_0x212771(0x298)][_0x212771(0x2a7)]({'staticMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x21e)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1e7))||_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x168))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x23b)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1bb))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1e5),_0x391b26),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1a2))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x297),_0x3f424a),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1bd))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x24d)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x2a9))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1dc)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x275))?(_0x3c1e83&&this[_0x212771(0x298)][_0x212771(0x163)](_0x3c1e83),this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1ab),_0x54726e||_0x212771(0x234)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x18a))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x181)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x161))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x186)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x2c7))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1c7)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x20f))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x221)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1e1))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x27c)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x26c))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x2ab)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x20b)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1));}),await this[_0x1923d8(0x22a)][_0x1923d8(0x160)](this[_0x1923d8(0x16c)][_0x1923d8(0x25b)][_0x1923d8(0x2bb)](_0x1923d8(0x1a3))),_0x5ddf43||await this[_0x1923d8(0x22a)][_0x1923d8(0x194)]();}async[_0xf7bdc8(0x25d)]({userMessage:_0x433f4b,quickActionData:_0x4802a0}){const _0x5386b3=_0xf7bdc8;if(!this[_0x5386b3(0x22a)])throw new _0x217c5a(_0x5386b3(0x169));this[_0x5386b3(0x22a)][_0x5386b3(0x19b)]()&&await this[_0x5386b3(0x22a)][_0x5386b3(0x29f)](this[_0x5386b3(0x2c9)][_0x5386b3(0x280)]()),this[_0x5386b3(0x22a)]['id']&&this[_0x5386b3(0x22a)][_0x5386b3(0x286)]&&await this[_0x5386b3(0x22a)][_0x5386b3(0x1f6)]({'userMessage':_0x433f4b,'quickActionData':_0x4802a0}),this[_0x5386b3(0x19d)]();}[_0xf7bdc8(0x19d)](){const _0x17c60d=_0xf7bdc8,_0x59e18f=_0x554683(this[_0x17c60d(0x16c)])[_0x17c60d(0x220)],_0xa20e78=Array[_0x17c60d(0x1e9)](_0x59e18f[_0x17c60d(0x22d)][_0x17c60d(0x2b4)](_0x3ca273));_0x59e18f[_0x17c60d(0x2a5)](_0x557952=>{const _0x3e6c6c=_0x17c60d;_0xa20e78[_0x3e6c6c(0x1d9)](_0x543eb3=>_0x557952[_0x3e6c6c(0x1eb)](_0x543eb3));});}[_0xf7bdc8(0x1ac)](){const _0x57458f=_0xf7bdc8;console[_0x57458f(0x1df)](_0x57458f(0x18e));}[_0xf7bdc8(0x247)](_0x119608){const _0xd97bfc=_0xf7bdc8;this[_0xd97bfc(0x298)][_0xd97bfc(0x23d)](_0x119608);}[_0xf7bdc8(0x25a)](_0x27b2cf){const _0x1203ca=_0xf7bdc8;_0x39c475(_0x27b2cf[_0x1203ca(0x261)]);}[_0xf7bdc8(0x1a9)](_0x42ba26){const _0x112d60=_0xf7bdc8;this[_0x112d60(0x22a)]?.[_0x112d60(0x2cc)](_0x42ba26);}[_0xf7bdc8(0x29c)](){const _0x2f1f3e=_0xf7bdc8;this[_0x2f1f3e(0x22a)]?.[_0x2f1f3e(0x27e)]();}[_0xf7bdc8(0x2a4)](){const _0x3da564=_0xf7bdc8;this[_0x3da564(0x22a)]?.[_0x3da564(0x1ba)]();}[_0xf7bdc8(0x162)](_0x2d404d){const _0x51d411=_0xf7bdc8,[_0x1eed6,_0x519ace]=_0x2d404d[_0x51d411(0x1a5)](':'),_0x4ec000=this[_0x51d411(0x22a)][_0x51d411(0x24f)](_0x1eed6),_0x9dbae0=_0x4ec000[_0x51d411(0x1c0)](_0x519ace);return{'interaction':_0x4ec000,'reply':_0x9dbae0};}[_0xf7bdc8(0x1b6)](_0x57a4a0,_0x4ba381=!0x1){const _0x2c5974=_0xf7bdc8,_0x3475c8=_0x554683(this[_0x2c5974(0x16c)]),_0xcefb14={'target':_0x3475c8[_0x2c5974(0x165)][_0x2c5974(0x213)][_0x2c5974(0x1b2)][_0x2c5974(0x235)](_0x3475c8[_0x2c5974(0x165)][_0x2c5974(0x188)][_0x2c5974(0x292)](_0x57a4a0)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x4ba381};_0x4ba381&&(_0xcefb14[_0x2c5974(0x257)]=!0x0),_0x145ff8(_0xcefb14);}[_0xf7bdc8(0x27f)](_0x55b0fa,_0x42df8b=!0x1){const _0x56fc10=_0xf7bdc8;this[_0x56fc10(0x298)][_0x56fc10(0x2c6)](_0x55b0fa||_0x5f46ca(this[_0x56fc10(0x16c)][_0x56fc10(0x1f8)],_0x56fc10(0x1cc)),_0x42df8b);}async[_0xf7bdc8(0x2b5)]({reply:_0x1a80b3,renderingStrategy:_0x4e1417}){const _0x5b28c4=_0xf7bdc8,{id:_0x5a0409,isDone:_0x5f3e83,type:_0x5e9a75,parsedContent:_0x1cf02b}=_0x1a80b3;if(_0x5b28c4(0x295)===_0x5e9a75){const _0x1c75ca=_0x1a80b3[_0x5b28c4(0x28b)]({'showDiff':this[_0x5b28c4(0x298)][_0x5b28c4(0x1f4)]});await this[_0x5b28c4(0x298)][_0x5b28c4(0x1d0)]({'id':_0x5a0409,'parts':_0x1c75ca,'renderingStrategy':_0x4e1417,'isDone':_0x5f3e83});}else _0x5b28c4(0x2c8)===_0x5e9a75&&await this[_0x5b28c4(0x298)][_0x5b28c4(0x1bf)]({'id':_0x5a0409,'parsedContent':_0x1cf02b,'renderingStrategy':_0x4e1417,'isDone':_0x5f3e83});_0x5f3e83&&_0x1a80b3[_0x5b28c4(0x1dd)][_0x5b28c4(0x26a)]>0x0&&this[_0x5b28c4(0x298)][_0x5b28c4(0x1d1)](_0x5a0409,_0x1a80b3[_0x5b28c4(0x1dd)]);}async[_0xf7bdc8(0x272)](){const _0x11ef7a=_0xf7bdc8,_0x59bc81=this[_0x11ef7a(0x22a)]?.[_0x11ef7a(0x24b)];_0x59bc81&&(_0x59bc81[_0x11ef7a(0x20a)](),this[_0x11ef7a(0x298)][_0x11ef7a(0x1ca)](_0x59bc81));}async[_0xf7bdc8(0x2c2)](){const _0xdb9e4a=_0xf7bdc8,_0x367ec0=this[_0xdb9e4a(0x22a)]?.[_0xdb9e4a(0x24b)];if(_0x367ec0){for await(const _0x123b93 of _0x367ec0[_0xdb9e4a(0x21f)])await this[_0xdb9e4a(0x2b5)]({'reply':_0x123b93,'renderingStrategy':_0xdb9e4a(0x240)});}}[_0xf7bdc8(0x24a)](_0x156fdc){const _0x4a74d2=_0xf7bdc8,_0x559feb={'positiveCount':_0x156fdc[_0x4a74d2(0x1d2)][_0x4a74d2(0x226)](_0x4d90d2=>_0x4a74d2(0x229)===_0x4d90d2[_0x4a74d2(0x1c4)])[_0x4a74d2(0x26a)],'totalCount':_0x156fdc[_0x4a74d2(0x1d2)][_0x4a74d2(0x26a)],'modificationId':_0x156fdc['id']},_0x53dba3=this[_0x4a74d2(0x22a)][_0x4a74d2(0x24f)](_0x156fdc[_0x4a74d2(0x1f3)])[_0x4a74d2(0x2c0)];this[_0x4a74d2(0x282)][_0x4a74d2(0x21d)](this[_0x4a74d2(0x22a)]['id'],_0x53dba3,_0x559feb);}}
23
+ const _0x292fdf=_0x5d74;(function(_0x3897f5,_0x4a54be){const _0x5c7488=_0x5d74,_0x233347=_0x3897f5();while(!![]){try{const _0x19829c=parseInt(_0x5c7488(0x10b))/0x1*(parseInt(_0x5c7488(0x128))/0x2)+-parseInt(_0x5c7488(0x175))/0x3*(-parseInt(_0x5c7488(0x121))/0x4)+-parseInt(_0x5c7488(0xb1))/0x5*(parseInt(_0x5c7488(0x188))/0x6)+-parseInt(_0x5c7488(0x12d))/0x7+parseInt(_0x5c7488(0x106))/0x8*(parseInt(_0x5c7488(0x165))/0x9)+-parseInt(_0x5c7488(0xeb))/0xa*(-parseInt(_0x5c7488(0xa4))/0xb)+parseInt(_0x5c7488(0x164))/0xc*(parseInt(_0x5c7488(0x134))/0xd);if(_0x19829c===_0x4a54be)break;else _0x233347['push'](_0x233347['shift']());}catch(_0x47688f){_0x233347['push'](_0x233347['shift']());}}}(_0x4807,0x4c44b));import{ContextPlugin as _0x3e3d89,Editor as _0x1067a3}from'ckeditor5/src/core.js';import{CKEditorError as _0x101c33,logError as _0x5365ce,scrollViewportToShowTarget as _0xa69f74,uid as _0x3de7ae}from'ckeditor5/src/utils.js';import{AIConnector as _0x14978f}from'../aicore/aiconnector.js';import{AITabs as _0x26b979}from'../aitabs/aitabs.js';import{AIChatConversation as _0x2d1f1e}from'./model/aichatconversation.js';import{getTranslation as _0x11b60c}from'../aicore/utils/common-translations.js';function _0x4807(){const _0x20c8e1=['open','modification-delta','uploadProgressChanged','setAddContextOptions','focusPromptInput','AIChatUI','redo','mouseLeaveSuggestion','showNext','_getDocumentRangeForReplyChanges','load','addCurrentDocumentToContext','isDocumentOperation','sendMessage','getInteractionAndReplyById','addFilesToContext','applySuggestion','history','_aiChatModels','stopListening','isCurrentDocumentInContext','clearConversationContextUI','requires','AI_CHAT_GENERIC_ERROR','getPath','replyCreated','contextItems','addFeedInteractionHeader','1800zcvNyb','18693wdiaEU','parse','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','resize','index','isStarted','ai-no-track-changes','resources','rejectSuggestion','ai-chat-context-file-too-large','addResourceToContext','resetMessageInput','get','insertSuggestion','updateFeedItemAIReplySuggestionPartState','AI_CHAT_CONTEXT_FILE_TOO_LARGE','713010rSmNaE','undo','text-delta','toViewRange','activeConversation','ai-chat-controller-mouse-over','commands','delete','interactionId','ai-chat-context-form-data-size-limits-exceeded','clearPendingContextUI','selection','_handleStartConversation','_toggleReasoning','node','reasoningStarted','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','removeMarker','partIndex','42QLvNeP','sendUserMessage','indexOf','getConversation','DocumentCompare','getChildAtOffset','resizeTabs','startInteraction','addFeedItemUserMessage','ai-chat-conversation-start-failed','createPositionAt','replyChangeGroupStateUpdated','full','indexes','loadSourceResources','accepted','howMany','_createFromRanges','hasChanges','addFeedItemError','content','markers','handleRemovedConversation','change','ai.chat.context','ai-chat-context-unsupported-file-type','uiId','AI_CHAT_ABORTED_MESSAGE','ai-chat-context-file-too-many-pages','getRoot','updateCapabilities','ai-chat-invalid-request','startAutoScroll','startConversation','abortPromptStream','collaboration.channelId','contextSent','rootName','ai-chat-context-unsupported-type','sourceResourcesLoaded','updateCurrentDocumentInContext','getTransformedByOperation','stop','ai-request-aborted','AI_CHAT_INVALID_REQUEST','sources','setContextItemLoading','interactionDestroyed','AI_CHAT_CONTEXT_INVALID_DATA','ai-chat-missing-channel-id','_aiEditing','createConversation','init','applyOperation','getSelectionText','createPositionFromPath','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','isInContext','Undo','updateResourceState','AITabs','ai-chat-controller-no-active-conversation','disableControls','hideFakeVisualSelection','filter','getContentParts','AIEditing','current-document','handleUserInteraction','log','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','getRanges','replies','updateFeedItemAIReplyContent','marker','contextItem','uid','fetchConversation','close','_scrollToSuggestionRange','toggleReasoning','toggleSuggestionDisplayMode','isLoading','addFeedItemAISuggestion','_updateReplyContent','setChangeGroupState','AIConnector','resetConversationTitle','populateSourceResourceBalloon','changes','removeFromContext','dialogClosed','afterInit','setConversationContext','getDocumentContext','contextItemAdded','_setIsMaximized','listenTo','_applyOperationsAsSuggestions','ai-conversation-','anchorId','Liked\x20response','ai-chat-file-upload-failed','set','getAttribute','$graveyard','removeSelectionFromContext','ai-chat-conversation-not-found','pluginName','static','view','cloneNode','baseVersion','_integrateEditor','resourceStateChanged','addOperation','_balloonShowDiff','main','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','rejected','sourcePosition','map','editors','getDocumentData','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','toggleWebSearch','finishInteraction','replyContentUpdated','_previewedChangeGroup','selectModel','domConverter','setLoadingMessage','children','removeContextItem','new','source','modelSelected','scrollFeedToSuggestion','_aiChatUi','736087TxQvlN','loadConversation','setFeedItemRenderingStrategy','streaming','like','_toggleWebSearch','documentContextContent','webSearchFinished','revert','_aiConnector','addUrlToContext','push','batch','385075ZICePZ','_insertSuggestion','reasoningFinished','closeSourceResourceBalloon','interactionCreated','unshift','selectedModel','from','resourceId','slice','mouseOverSuggestion','TrackChanges','root','getInteraction','isUploadInProgress','options','updateConversationTitle','pending','query','getOperations','remove','AI_BALLOON_HEADER_TITLE','isDisabled','capabilitiesUpdated','_applySuggestion','setIsMaximized','state','find','resource','getGroupId','data-id','sourceId','addFileToContext','Showing\x20conversation\x20history...','removed','showFakeVisualSelection','_startConversationSafely','addSelectionToContext','startsWith','getFirstRange','AI_CHAT_UNTITLED_CONVERSATION','addDocumentToContext','showDiff','interactionFinished','locale','_flushLastInteractionUI','setSelectedModel','_batchToChanges','getDiff','updateFeedItemAIReplySuggestionContent','showPrevious','Disliked\x20response','plugins','isOpen','setIsUploadInProgress','createRange','toggleLoadingSkeleton','conversationInitialized','20dlSwXb','chat','removeFeedInteraction','addSelectionToChatContext','toString','setModel','mapper','type','AI_CHAT_RESOURCE_LOAD_FAILED','updateFeedItemAIReplySources','alignToTop','_openBalloonFor','start','resizedTabs','_updateRatings','message','enableControls','config','activateTab','ai-chat-url-upload-failed','getChildren','_logError','AIChatController','maxOffset','messageId','contextItemRemoved','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','1864oDXmvF','findIndex','ai.chat.models.displayedModels','changeGroups','model','9FrIAGB','range','error','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','forEach','viewRangeToDom','end','contextItemLoadingEnded','_removeAISelectionMarkers','setConversationTitle','ai.availableReplyActions','document','_removeFromContext','getChild','addFeedItemStaticMessage','replyId','nextSibling','data','stopInteraction','isCurrentDocumentInConversation','addContextOptionsChanged','isOfficialPlugin','4CvAFDM','ai-chat-context-invalid-data','ready','editing','_handleUIUserMessage','length','path','39154pBjIgn','AI_CHAT_UNABLE_TO_START_CONVERSATION','isPremiumPlugin','TrackChangesEditing','getMarkersGroup','1468866oNkUJr','add','version','updateContent','ai-chat-resource-load-failed','upsertAIChatRating','interactionStarted','2574QgReXa','_showConversationHistory','showChangeInText','addFeedItemAIReply','lastInteraction','removeSelectionFromChatContext','ai.chat.models.defaultModelId','context','webSearchStarted','ai-chat-conversation-init-failed','ai-chat-source-resources-load-failed','outdated','getReply','isModelAvailable','dislike','has','_stopLastInteraction','split','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','addContextItem'];_0x4807=function(){return _0x20c8e1;};return _0x4807();}import{AI_VISUAL_SELECTION_MARKER_NAME as _0x17a7aa}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x563e79}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x557d0d}from'./model/aichatmodels.js';function _0x5d74(_0xd57a28,_0x256cbd){const _0x480759=_0x4807();return _0x5d74=function(_0x5d74f2,_0x218d7b){_0x5d74f2=_0x5d74f2-0x8b;let _0x5b2d01=_0x480759[_0x5d74f2];return _0x5b2d01;},_0x5d74(_0xd57a28,_0x256cbd);}import{getEditorFromContext as _0x226eec}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x457681,DATA_ID_MODEL_ATTRIBUTE as _0x2d7496}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x31c633,getOperationsFromReply as _0x52c944}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x501679,getMinimalSelection as _0x4a29af}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x321a8d,_DetachOperation as _0x58b918}from'ckeditor5/src/engine.js';import{findOne as _0x1dac0c,getAttribute as _0x27afbd,serialize as _0x3e1bd3,Document as _0x5e6d9b,findByAttribute as _0x225c72}from'../aicore/utils/htmlparser.js';import{IconAI as _0x1e590e}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0xee1d9e}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x41286c}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x3e3d89{[_0x292fdf(0x1ba)];[_0x292fdf(0xad)];[_0x292fdf(0xa3)];[_0x292fdf(0x15a)];[_0x292fdf(0xe0)]=new Map();[_0x292fdf(0x99)]=null;[_0x292fdf(0x8d)]=!0x1;static get[_0x292fdf(0x15e)](){return[_0x14978f,_0x41286c,_0x457681];}static get[_0x292fdf(0x1f4)](){const _0xab3d0e=_0x292fdf;return _0xab3d0e(0x101);}static get[_0x292fdf(0x120)](){return!0x0;}static get[_0x292fdf(0x12a)](){return!0x0;}[_0x292fdf(0x1bc)](){const _0x3348a2=_0x292fdf;this[_0x3348a2(0xad)]=this[_0x3348a2(0x13b)][_0x3348a2(0xe5)][_0x3348a2(0x171)](_0x3348a2(0x1de)),this[_0x3348a2(0xa3)]=this[_0x3348a2(0x13b)][_0x3348a2(0xe5)][_0x3348a2(0x171)](_0x3348a2(0x14d)),this[_0x3348a2(0x1ba)]=this[_0x3348a2(0x13b)][_0x3348a2(0xe5)][_0x3348a2(0x171)](_0x3348a2(0x1ca)),this[_0x3348a2(0x15a)]=new _0x557d0d({'connector':this[_0x3348a2(0xad)],'availableModels':this[_0x3348a2(0x13b)][_0x3348a2(0xfc)][_0x3348a2(0x171)](_0x3348a2(0x108)),'defaultModelId':this[_0x3348a2(0x13b)][_0x3348a2(0xfc)][_0x3348a2(0x171)](_0x3348a2(0x13a))});const _0x2aacec=this[_0x3348a2(0x13b)][_0x3348a2(0xe5)][_0x3348a2(0x171)](_0x3348a2(0x1c4));this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x1a9),()=>{const _0x387fe3=_0x3348a2;this[_0x387fe3(0xd5)]();}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x189),(_0x43920e,_0x241e8f)=>{const _0x32ff18=_0x3348a2;this[_0x32ff18(0x125)]({'userMessage':_0x241e8f});}),this[_0x3348a2(0x1e9)](_0x2aacec,_0x3348a2(0xf8),(_0x20bf57,_0x16eadf)=>{const _0xb3ab23=_0x3348a2;this[_0xb3ab23(0x1e8)](_0x16eadf);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x18e),()=>{const _0x4264a5=_0x3348a2;_0x2aacec[_0x4264a5(0x168)]();}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x1aa),async()=>{const _0x4527b5=_0x3348a2;await this[_0x4527b5(0x144)](),await this[_0x4527b5(0xde)](),this[_0x4527b5(0x139)]();}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0xda),()=>{const _0x4b264f=_0x3348a2;this[_0x4b264f(0x179)]?.[_0x4b264f(0x153)](_0x11b60c(this[_0x4b264f(0x13b)][_0x4b264f(0xdd)],_0x4b264f(0x167)));}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0xd1),(_0x256880,_0x36e582)=>{const _0x10e84d=_0x3348a2;this[_0x10e84d(0x179)]?.[_0x10e84d(0x157)](Array[_0x10e84d(0xb8)](_0x36e582));}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0xae),(_0x265f93,_0x3c523e)=>{const _0x328863=_0x3348a2;this[_0x328863(0x179)]?.[_0x328863(0xae)](_0x3c523e);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x16f),(_0x1f08f7,_0x5e9a29)=>{const _0x1499b1=_0x3348a2;this[_0x1499b1(0x179)]?.[_0x1499b1(0x16f)](_0x5e9a29[_0x1499b1(0xa0)],_0x5e9a29[_0x1499b1(0xcd)]);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x9e),(_0x212407,_0x18b7ab)=>{const _0x3dc122=_0x3348a2;this[_0x3dc122(0x117)](_0x18b7ab);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x196),(_0x3d0362,_0x1c29c4)=>{const _0xcc1726=_0x3348a2;this[_0xcc1726(0x179)]?.[_0xcc1726(0x196)](_0x1c29c4[_0xcc1726(0xd0)],_0x1c29c4[_0xcc1726(0xc3)],_0x1c29c4[_0xcc1726(0x1d4)]);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x96),()=>{const _0x5e93ff=_0x3348a2;this[_0x5e93ff(0xa9)]();}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x1d8),()=>{const _0x170111=_0x3348a2;this[_0x170111(0x182)]();}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x9a),(_0x453a1b,_0x5b3b19)=>{const _0x1bc0d7=_0x3348a2;this[_0x1bc0d7(0x179)]?.[_0x1bc0d7(0xf0)](_0x5b3b19);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0xa8),(_0x20a8e6,{replyId:_0xc08173})=>{const _0x521f58=_0x3348a2;console[_0x521f58(0x1cd)](_0x521f58(0x1ed),_0xc08173);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x142),(_0x3b5fc4,{replyId:_0x1c032d})=>{const _0x128058=_0x3348a2;console[_0x128058(0x1cd)](_0x128058(0xe4),_0x1c032d);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x172),(_0x8c12c7,_0x1c3013)=>{const _0xb8da62=_0x3348a2;this[_0xb8da62(0x13b)][_0xb8da62(0xe5)][_0xb8da62(0x171)](_0x41286c)[_0xb8da62(0x1d6)](),this[_0xb8da62(0xb2)](_0x1c3013);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x136),(_0x2feaa5,{replyId:_0x9fe79e,partIndex:_0xaa10c7})=>{const _0x109e6c=_0x3348a2;this[_0x109e6c(0x8d)]=this[_0x109e6c(0xa3)][_0x109e6c(0xdb)],this[_0x109e6c(0xf6)](_0x9fe79e,_0xaa10c7);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0xbb),(_0x4443af,{replyId:_0x186ffc,partIndex:_0x38e71b})=>{const _0x28d950=_0x3348a2,_0x28d559=this[_0x28d950(0x151)](_0x186ffc,_0x38e71b);_0x28d559&&_0x28d950(0x1f1)!=_0x28d559[_0x28d950(0x10c)][_0x28d950(0xbd)][_0x28d950(0x1ad)]&&this[_0x28d950(0x1ba)][_0x28d950(0xd4)]([_0x28d559[_0x28d950(0x10c)]],_0x28d950(0x17a));}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x14f),()=>{const _0x539918=_0x3348a2;this[_0x539918(0x1ba)][_0x539918(0x1c7)](_0x539918(0x17a));}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x158),(_0x623fd2,_0xc21516)=>{const _0x3d2873=_0x3348a2;this[_0x3d2873(0x13b)][_0x3d2873(0xe5)][_0x3d2873(0x171)](_0x41286c)[_0x3d2873(0x1d6)](),this[_0x3d2873(0xc9)](_0xc21516);}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x1d9),async(_0x2bbf9c,{replyId:_0x31786f,showDiff:_0x315882})=>{const _0x2efe05=_0x3348a2,{reply:_0x278ef9}=this[_0x2efe05(0x156)](_0x31786f),_0x2b9f59=_0x278ef9[_0x2efe05(0x1c9)]({'showDiff':_0x315882});await this[_0x2efe05(0xa3)][_0x2efe05(0xe2)]({'id':_0x278ef9['id'],'parts':_0x2b9f59,'renderingStrategy':_0x2efe05(0x1f5)});}),this[_0x3348a2(0x1e9)](this[_0x3348a2(0xa3)],_0x3348a2(0x16d),(_0x37117c,{replyId:_0x32c173,partIndex:_0x37fca6})=>{const _0x40f2c6=_0x3348a2;this[_0x40f2c6(0x99)]?.[_0x40f2c6(0x11a)]==_0x32c173&&this[_0x40f2c6(0x99)]?.[_0x40f2c6(0x187)]==_0x37fca6&&this[_0x40f2c6(0x13b)][_0x40f2c6(0xe5)][_0x40f2c6(0x171)](_0x41286c)[_0x40f2c6(0x1d6)]();const {reply:_0x992909}=this[_0x40f2c6(0x156)](_0x32c173);_0x992909[_0x40f2c6(0x1dd)](_0x37fca6,_0x40f2c6(0x90)),this[_0x40f2c6(0x1ba)][_0x40f2c6(0x1c7)](_0x40f2c6(0x17a));});}async[_0x292fdf(0x1e4)](){const _0x1fd414=_0x292fdf;this[_0x1fd414(0x13b)]instanceof _0x1067a3?this[_0x1fd414(0x1f9)](this[_0x1fd414(0x13b)]):this[_0x1fd414(0x1e9)](this[_0x1fd414(0x13b)][_0x1fd414(0x93)],_0x1fd414(0x12e),(_0x30d52d,_0x441a5e)=>{const _0x4b0dcc=_0x1fd414;_0x441a5e['on'](_0x4b0dcc(0x123),()=>{const _0x5d1382=_0x4b0dcc;this[_0x5d1382(0x1f9)](_0x441a5e);});}),await this[_0x1fd414(0xd5)]();}[_0x292fdf(0xb2)](_0x474e5e){const _0x51fe88=_0x292fdf,_0x127ff3=_0x226eec(this[_0x51fe88(0x13b)]);if(!_0x127ff3[_0x51fe88(0xe5)][_0x51fe88(0x143)](_0x51fe88(0xbc)))throw new _0x101c33(_0x51fe88(0x16b),null);const _0x36ec01=this[_0x51fe88(0x13b)][_0x51fe88(0xe5)][_0x51fe88(0x171)](_0x51fe88(0x18c)),{reply:_0x1764f6,interaction:_0x1b5143}=this[_0x51fe88(0x156)](_0x474e5e[_0x51fe88(0x11a)]),_0x476c7c=this[_0x51fe88(0x151)](_0x474e5e[_0x51fe88(0x11a)],_0x474e5e[_0x51fe88(0x187)]),_0x433759=void 0x0!==_0x474e5e[_0x51fe88(0x187)]?[_0x1764f6[_0x51fe88(0x109)][_0x474e5e[_0x51fe88(0x187)]]]:_0x1764f6[_0x51fe88(0x109)][_0x51fe88(0x1c8)](_0x19e9b7=>_0x51fe88(0xc2)==_0x19e9b7[_0x51fe88(0xcb)]),_0x2784be=_0x433759[_0x51fe88(0x92)](_0x37912c=>_0x1764f6[_0x51fe88(0x109)][_0x51fe88(0x18a)](_0x37912c));if(!_0x476c7c||_0x51fe88(0x1f1)==_0x476c7c[_0x51fe88(0x10c)][_0x51fe88(0xbd)][_0x51fe88(0x1ad)])return void _0x2784be[_0x51fe88(0x10f)](_0x5ad786=>_0x1764f6[_0x51fe88(0x1dd)](_0x5ad786,_0x51fe88(0x13f)));_0x2784be[_0x51fe88(0x10f)](_0x5ba04a=>_0x1764f6[_0x51fe88(0x1dd)](_0x5ba04a,_0x51fe88(0x197)));const _0x45ba35=_0x52c944({'editor':_0x127ff3,'reply':_0x1764f6,'interaction':_0x1b5143,'groups':_0x433759,'transform':!0x0,'documentCompare':_0x36ec01,'documentCompareOptions':{'anchor':_0x51fe88(0x8e),'markDeletions':!0x0}});let _0x5d8640;_0x476c7c&&this[_0x51fe88(0x1d7)](_0x476c7c[_0x51fe88(0x10c)]),_0x127ff3[_0x51fe88(0x10a)][_0x51fe88(0x19f)](_0x22b5fe=>{const _0x2c93a1=_0x51fe88;_0x5d8640=_0x22b5fe[_0x2c93a1(0xb0)],_0x127ff3[_0x2c93a1(0xe5)][_0x2c93a1(0x171)](_0x2c93a1(0x12b))[_0x2c93a1(0x1ea)](_0x45ba35),this[_0x2c93a1(0x1ba)][_0x2c93a1(0x1c7)](_0x2c93a1(0x17a));}),this[_0x51fe88(0xe0)][_0x51fe88(0x1ef)](_0x5d8640,{'interactionId':_0x1b5143['id'],'replyId':_0x1764f6['id'],'indexes':_0x2784be[_0x51fe88(0xba)]()}),this[_0x51fe88(0xf9)](_0x1764f6);}[_0x292fdf(0xc9)](_0x3c19cf){const _0x1417ed=_0x292fdf,_0x5871cf=_0x226eec(this[_0x1417ed(0x13b)]),_0x70310=this[_0x1417ed(0x13b)][_0x1417ed(0xe5)][_0x1417ed(0x171)](_0x457681),{reply:_0x59a0d9,interaction:_0x1ea780}=this[_0x1417ed(0x156)](_0x3c19cf[_0x1417ed(0x11a)]),_0x2bbe8e=this[_0x1417ed(0x151)](_0x3c19cf[_0x1417ed(0x11a)],_0x3c19cf[_0x1417ed(0x187)]),_0x3f18b6=void 0x0!==_0x3c19cf[_0x1417ed(0x187)]?[_0x59a0d9[_0x1417ed(0x109)][_0x3c19cf[_0x1417ed(0x187)]]]:_0x59a0d9[_0x1417ed(0x109)][_0x1417ed(0x1c8)](_0x46967a=>_0x1417ed(0xc2)==_0x46967a[_0x1417ed(0xcb)]),_0x34a5ac=_0x3f18b6[_0x1417ed(0x92)](_0x1d6281=>_0x59a0d9[_0x1417ed(0x109)][_0x1417ed(0x18a)](_0x1d6281));if(!_0x2bbe8e||_0x1417ed(0x1f1)==_0x2bbe8e[_0x1417ed(0x10c)][_0x1417ed(0xbd)][_0x1417ed(0x1ad)])return void _0x34a5ac[_0x1417ed(0x10f)](_0x2432b4=>_0x59a0d9[_0x1417ed(0x1dd)](_0x2432b4,_0x1417ed(0x13f)));_0x34a5ac[_0x1417ed(0x10f)](_0x3f6601=>_0x59a0d9[_0x1417ed(0x1dd)](_0x3f6601,_0x1417ed(0x197)));const _0x122f0a=_0x52c944({'editor':_0x5871cf,'reply':_0x59a0d9,'interaction':_0x1ea780,'groups':_0x3f18b6,'transform':!0x0,'documentCompare':_0x70310,'documentCompareOptions':{'anchor':_0x1417ed(0x8e),'markDeletions':!0x1}});let _0x25cad4;_0x2bbe8e&&this[_0x1417ed(0x1d7)](_0x2bbe8e[_0x1417ed(0x10c)]),_0x5871cf[_0x1417ed(0x10a)][_0x1417ed(0x19f)](_0x37b665=>{const _0x1cbe89=_0x1417ed;_0x25cad4=_0x37b665[_0x1cbe89(0xb0)];for(const _0x47ba9b of _0x122f0a)_0x47ba9b[_0x1cbe89(0x1f8)]=_0x5871cf[_0x1cbe89(0x10a)][_0x1cbe89(0x116)][_0x1cbe89(0x12f)],_0x31c633(_0x5871cf,_0x47ba9b),_0x37b665[_0x1cbe89(0xb0)][_0x1cbe89(0x8c)](_0x47ba9b),_0x5871cf[_0x1cbe89(0x10a)][_0x1cbe89(0x1bd)](_0x47ba9b);}),this[_0x1417ed(0xe0)][_0x1417ed(0x1ef)](_0x25cad4,{'interactionId':_0x1ea780['id'],'replyId':_0x59a0d9['id'],'indexes':_0x34a5ac[_0x1417ed(0xba)]()}),this[_0x1417ed(0xf9)](_0x59a0d9);}[_0x292fdf(0xf6)](_0x454a68,_0x3b5c78){const _0x3ed172=_0x292fdf,_0x3b0f52=_0x226eec(this[_0x3ed172(0x13b)]),_0x7ec3bf=this[_0x3ed172(0x151)](_0x454a68,_0x3b5c78),_0x8cc9ec=this[_0x3ed172(0x13b)][_0x3ed172(0xe5)][_0x3ed172(0x171)](_0x41286c);if(!_0x7ec3bf)return void _0x8cc9ec[_0x3ed172(0x1d6)]();const {range:_0x5014bc,currentIndex:_0x7420f9}=_0x7ec3bf;if(_0x3ed172(0x1f1)==_0x5014bc[_0x3ed172(0xbd)][_0x3ed172(0x1ad)]){const {reply:_0x4e2f3d}=this[_0x3ed172(0x156)](_0x454a68);return _0x4e2f3d[_0x3ed172(0x1dd)](_0x7420f9,_0x3ed172(0x13f)),void _0x8cc9ec[_0x3ed172(0x1d6)]();}if(this[_0x3ed172(0x99)]?.[_0x3ed172(0x11a)]==_0x454a68&&this[_0x3ed172(0x99)]?.[_0x3ed172(0x187)]==_0x7420f9)return;this[_0x3ed172(0x15b)](_0x8cc9ec),this[_0x3ed172(0x99)]={'replyId':_0x454a68,'partIndex':_0x7420f9};let _0x16068b=_0x3b0f52[_0x3ed172(0xfc)][_0x3ed172(0x171)](_0x3ed172(0x115))||[..._0x563e79];_0x3b0f52[_0x3ed172(0xe5)][_0x3ed172(0x143)](_0x3ed172(0xbc))||(_0x16068b=_0x16068b[_0x3ed172(0x1c8)](_0x483f96=>_0x3ed172(0x172)!=_0x483f96));const _0x4d415c=new _0xee1d9e(_0x3b0f52[_0x3ed172(0xdd)],{'showDiff':this[_0x3ed172(0x8d)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x3ed172(0x194)},'hideHeader':!0x0,'availableActions':_0x16068b});this[_0x3ed172(0x15b)](_0x4d415c);const {reply:_0x334b9d}=this[_0x3ed172(0x156)](_0x454a68),_0x5878d9=_0x334b9d[_0x3ed172(0x1c9)]({'showDiff':this[_0x3ed172(0x8d)]})[_0x3ed172(0x1c8)](_0x19b64f=>_0x19b64f[_0x3ed172(0x19a)]),_0x4eee8b=_0x5878d9[_0x3ed172(0x107)](_0x471616=>_0x471616[_0x3ed172(0x169)]==_0x7420f9);if(-0x1==_0x4eee8b)return;const _0x36dc66=_0x5878d9[_0x4eee8b],_0xe3eabc=_0x5878d9['at']((_0x4eee8b-0x1)%_0x5878d9[_0x3ed172(0x126)])?.[_0x3ed172(0x169)],_0x9bf8a9=_0x5878d9['at']((_0x4eee8b+0x1)%_0x5878d9[_0x3ed172(0x126)])?.[_0x3ed172(0x169)];_0x4d415c[_0x3ed172(0x130)]({'parts':[_0x36dc66],'renderingStrategy':_0x3ed172(0x1f5)});const _0x5518ad=_0x7420f9!==_0xe3eabc;this[_0x3ed172(0x1d7)](_0x5014bc,!0x0),_0x8cc9ec[_0x3ed172(0x148)]({'index':_0x7420f9,'title':_0x11b60c(this[_0x3ed172(0x13b)][_0x3ed172(0xdd)],_0x3ed172(0xc6),(_0x4eee8b+0x1)[_0x3ed172(0xef)]()),'icon':_0x1e590e,'mainView':_0x4d415c,'showRotator':_0x5518ad,'showApplyButton':!0x0,'showSuggestButton':_0x3b0f52[_0x3ed172(0xe5)][_0x3ed172(0x143)](_0x3ed172(0xbc)),'ranges':[_0x5014bc]}),this[_0x3ed172(0xa3)][_0x3ed172(0xa2)](_0x454a68,_0x7420f9),this[_0x3ed172(0x1e9)](_0x4d415c,_0x3ed172(0x1d9),(_0x53858d,{showDiff:_0x8b14fe})=>{const _0x3b64b3=_0x3ed172;this[_0x3b64b3(0x8d)]=_0x8b14fe;const {reply:_0x242375}=this[_0x3b64b3(0x156)](_0x454a68),_0x360c50=_0x242375[_0x3b64b3(0x1c9)]({'showDiff':_0x8b14fe,'groupIndex':_0x7420f9});_0x4d415c[_0x3b64b3(0x130)]({'parts':_0x360c50,'renderingStrategy':_0x3b64b3(0x1f5)});}),this[_0x3ed172(0x1e9)](_0x8cc9ec,_0x3ed172(0x158),()=>{const _0x14d2f9=_0x3ed172;this[_0x14d2f9(0xc9)]({'replyId':_0x454a68,'partIndex':_0x7420f9}),_0x5518ad?this[_0x14d2f9(0xf6)](_0x454a68,_0x9bf8a9):_0x8cc9ec[_0x14d2f9(0x1d6)]();}),this[_0x3ed172(0x1e9)](_0x8cc9ec,_0x3ed172(0x172),()=>{const _0x4f961f=_0x3ed172;this[_0x4f961f(0xb2)]({'replyId':_0x454a68,'partIndex':_0x7420f9}),_0x5518ad?this[_0x4f961f(0xf6)](_0x454a68,_0x9bf8a9):_0x8cc9ec[_0x4f961f(0x1d6)]();}),_0x5518ad&&(this[_0x3ed172(0x1e9)](_0x8cc9ec,_0x3ed172(0x150),()=>{const _0x5a0f6b=_0x3ed172;this[_0x5a0f6b(0xf6)](_0x454a68,_0x9bf8a9);}),this[_0x3ed172(0x1e9)](_0x8cc9ec,_0x3ed172(0xe3),()=>{const _0x23ecfa=_0x3ed172;this[_0x23ecfa(0xf6)](_0x454a68,_0xe3eabc);})),this[_0x3ed172(0x1e9)](_0x8cc9ec,_0x3ed172(0x1e3),()=>{const _0x2412cf=_0x3ed172;this[_0x2412cf(0x15b)](_0x8cc9ec),this[_0x2412cf(0x15b)](_0x4d415c),this[_0x2412cf(0x99)]=null;});}[_0x292fdf(0x151)](_0x4a0e38,_0x2f16e8){const _0x307b09=_0x292fdf,_0x30ea61=_0x226eec(this[_0x307b09(0x13b)]),{reply:_0x3b5525,interaction:_0xf821a5}=this[_0x307b09(0x156)](_0x4a0e38),_0x186360=_0x3b5525[_0x307b09(0x109)][_0x307b09(0x1c8)](_0x2f2b74=>_0x307b09(0xc2)==_0x2f2b74[_0x307b09(0xcb)]),_0x358bc5=_0x186360[_0x307b09(0x92)](_0x59f74c=>_0x3b5525[_0x307b09(0x109)][_0x307b09(0x18a)](_0x59f74c));void 0x0===_0x2f16e8&&(_0x2f16e8=_0x358bc5[0x0]);const _0x5e12c6=_0x358bc5[_0x307b09(0x18a)](_0x2f16e8);if(-0x1==_0x5e12c6)return null;const _0x577b30=_0x186360[_0x5e12c6],_0xe56812=new _0x5e6d9b([]),_0x1406cc=new _0x5e6d9b([]);for(const _0xdd8095 of _0x577b30[_0x307b09(0x1e1)])if(_0x307b09(0xd3)!=_0xdd8095[_0x307b09(0xf2)]&&_0x1406cc[_0x307b09(0x9d)][_0x307b09(0xaf)](_0xdd8095[_0x307b09(0x183)][_0x307b09(0x1f7)](!0x0)),_0x307b09(0x9f)!=_0xdd8095[_0x307b09(0xf2)]){const _0x4450bb=_0x1dac0c(_0x18ba29=>_0x27afbd(_0x18ba29,_0x307b09(0xcf))==_0xdd8095['id'],_0x3b5525[_0x307b09(0xaa)],!0x0);_0xe56812[_0x307b09(0x9d)][_0x307b09(0xaf)](_0x4450bb[_0x307b09(0x1f7)](!0x0));}if(0x0==_0xe56812[_0x307b09(0x9d)][_0x307b09(0x126)]){if(_0x577b30[_0x307b09(0x1e1)][0x0][_0x307b09(0x1ec)]){const _0xb80e3d=_0x225c72(_0x307b09(0xcf),_0x577b30[_0x307b09(0x1e1)][0x0][_0x307b09(0x1ec)],_0x3b5525[_0x307b09(0xaa)]);_0xe56812[_0x307b09(0x9d)][_0x307b09(0xb6)](_0xb80e3d[_0x307b09(0x1f7)](!0x0)),_0x1406cc[_0x307b09(0x9d)][_0x307b09(0xb6)](_0xb80e3d[_0x307b09(0x1f7)](!0x0)),_0xb80e3d[_0x307b09(0x11b)]&&(_0xe56812[_0x307b09(0x9d)][_0x307b09(0xaf)](_0xb80e3d[_0x307b09(0x11b)][_0x307b09(0x1f7)](!0x0)),_0x1406cc[_0x307b09(0x9d)][_0x307b09(0xaf)](_0xb80e3d[_0x307b09(0x11b)][_0x307b09(0x1f7)](!0x0)));}else{const _0x44ba0d=_0x3b5525[_0x307b09(0xaa)][_0x307b09(0x9d)][0x0];if(!_0x44ba0d)return null;_0xe56812[_0x307b09(0x9d)][_0x307b09(0xaf)](_0x44ba0d[_0x307b09(0x1f7)](!0x0)),_0x1406cc[_0x307b09(0x9d)][_0x307b09(0xaf)](_0x44ba0d[_0x307b09(0x1f7)](!0x0));}}const _0x4eca5a=_0xf821a5[_0x307b09(0x1e6)](),_0x2804e9=_0x30ea61[_0x307b09(0x11c)][_0x307b09(0x166)](_0x4eca5a[_0x307b09(0x19c)]),_0x296936=_0x3e1bd3(_0xe56812),_0x3496df=_0x30ea61[_0x307b09(0x11c)][_0x307b09(0x166)](_0x296936),_0x3fed1d=_0x30ea61[_0x307b09(0x11c)][_0x307b09(0x166)](_0x296936),_0xf45d20=_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x192)](_0x3496df,0x0),_0x34970f=_0x3e1bd3(_0x1406cc),_0x5db072={'anchor':_0xf45d20,'markDeletions':!0x1},_0xaac568=_0x30ea61[_0x307b09(0xe5)][_0x307b09(0x171)](_0x457681)[_0x307b09(0xe1)](_0x296936,_0x34970f,_0x5db072)[_0x307b09(0xc4)]();if(!_0xaac568[_0x307b09(0x126)])return null;_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x19f)](_0xaacc04=>{const _0x16e9a3=_0x307b09;for(const _0x2e4458 of _0xaac568)if(_0x16e9a3(0xc5)==_0x2e4458[_0x16e9a3(0xf2)]){const _0x13e8ea=_0x2e4458[_0x16e9a3(0x91)],_0x1df691=_0x2e4458[_0x16e9a3(0x198)],_0x366b27=new _0x58b918(_0x13e8ea,_0x1df691);_0xaacc04[_0x16e9a3(0xb0)][_0x16e9a3(0x8c)](_0x366b27),_0x30ea61[_0x16e9a3(0x10a)][_0x16e9a3(0x1bd)](_0x366b27);}else _0x16e9a3(0x1d2)!==_0x2e4458[_0x16e9a3(0xf2)]&&(_0x2e4458[_0x16e9a3(0x1f8)]=null,_0x2e4458[_0x16e9a3(0x154)]=!0x1,_0xaacc04[_0x16e9a3(0xb0)][_0x16e9a3(0x8c)](_0x2e4458),_0x30ea61[_0x16e9a3(0x10a)][_0x16e9a3(0x1bd)](_0x2e4458));});const _0x3dd63f=_0x4a29af(_0x30ea61,_0xaac568,_0x3496df);_0x501679(_0x30ea61[_0x307b09(0x10a)],_0x3dd63f);const _0x5dc9ee=_0x3dd63f[_0x307b09(0xd8)]()[_0x307b09(0xf7)][_0x307b09(0x127)][_0x307b09(0xba)](),_0x587ba1=_0x3dd63f[_0x307b09(0xd8)]()[_0x307b09(0x111)][_0x307b09(0x127)][_0x307b09(0xba)](),_0x1db74d=[];let _0x195673=_0x3496df,_0x5999f1=_0x3fed1d;for(let _0x33daa3=0x0;_0x33daa3<_0x587ba1[_0x307b09(0x126)];_0x33daa3++){const _0x5efeb0=_0x195673[_0x307b09(0x102)]-_0x587ba1[_0x33daa3];_0x1db74d[_0x33daa3]=_0x5999f1[_0x307b09(0x102)]-_0x5efeb0,_0x195673=_0x195673[_0x307b09(0x18d)](_0x587ba1[_0x33daa3]),_0x5999f1=_0x5999f1[_0x307b09(0x18d)](_0x1db74d[_0x33daa3]);}const _0x1bd9a6=_0x30ea61[_0x307b09(0x10a)][_0x307b09(0xe8)](_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x1bf)](_0x3fed1d,_0x5dc9ee),_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x1bf)](_0x3fed1d,_0x1db74d)),_0x4e56e0=_0x3fed1d[_0x307b09(0x118)](0x0)[_0x307b09(0x1f0)](_0x2d7496),_0x56671c=Array[_0x307b09(0xb8)](_0x2804e9[_0x307b09(0xff)]())[_0x307b09(0xcc)](_0x4dabc6=>_0x4dabc6[_0x307b09(0x1f0)](_0x2d7496)==_0x4e56e0)[_0x307b09(0x160)](),_0x16b0bc=_0x1bd9a6[_0x307b09(0xf7)][_0x307b09(0x127)][_0x307b09(0xba)](),_0x5daea6=_0x1bd9a6[_0x307b09(0x111)][_0x307b09(0x127)][_0x307b09(0xba)]();_0x16b0bc[0x0]=_0x56671c[0x0]+_0x16b0bc[0x0],_0x5daea6[0x0]=_0x56671c[0x0]+_0x5daea6[0x0];let _0x1d3028=_0x30ea61[_0x307b09(0x10a)][_0x307b09(0xe8)](_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x1bf)](_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x116)][_0x307b09(0x1a5)](),_0x16b0bc),_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x1bf)](_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x116)][_0x307b09(0x1a5)](),_0x5daea6));const _0xb77601=_0x30ea61[_0x307b09(0x10a)][_0x307b09(0x116)][_0x307b09(0x159)][_0x307b09(0xc4)](_0x4eca5a[_0x307b09(0x12f)]);for(const _0x5cd072 of _0xb77601)_0x1d3028=_0x321a8d[_0x307b09(0x199)](_0x1d3028[_0x307b09(0x1b1)](_0x5cd072));return{'range':_0x1d3028,'currentIndex':_0x2f16e8};}[_0x292fdf(0x1f9)](_0x55db9e){const _0x4fd9c2=_0x292fdf;if(!_0x55db9e[_0x4fd9c2(0xe5)][_0x4fd9c2(0x143)](_0x4fd9c2(0x1c2)))return;const _0x59a99b=_0x55db9e[_0x4fd9c2(0x17b)][_0x4fd9c2(0x171)](_0x4fd9c2(0x176)),_0x5ded78=_0x55db9e[_0x4fd9c2(0x17b)][_0x4fd9c2(0x171)](_0x4fd9c2(0x14e));this[_0x4fd9c2(0x1e9)](_0x59a99b,_0x4fd9c2(0xac),(_0x220a6e,_0x22799b,_0x2868e5)=>{const _0x5db924=_0x4fd9c2,_0x3ace71=this[_0x5db924(0xe0)][_0x5db924(0x171)](_0x22799b);if(!_0x3ace71)return;const _0x535c9e=this[_0x5db924(0x179)][_0x5db924(0xbe)](_0x3ace71[_0x5db924(0x17d)])[_0x5db924(0x140)](_0x3ace71[_0x5db924(0x11a)]);_0x3ace71[_0x5db924(0x195)][_0x5db924(0x10f)](_0x3f37e8=>_0x535c9e[_0x5db924(0x1dd)](_0x3f37e8,_0x5db924(0xc2))),this[_0x5db924(0xe0)][_0x5db924(0x17c)](_0x22799b),this[_0x5db924(0xe0)][_0x5db924(0x1ef)](_0x2868e5,_0x3ace71);}),this[_0x4fd9c2(0x1e9)](_0x5ded78,_0x4fd9c2(0xac),(_0x288e57,_0x16151f,_0x20e7ff)=>{const _0x5a4a34=_0x4fd9c2,_0x13a968=this[_0x5a4a34(0xe0)][_0x5a4a34(0x171)](_0x16151f);if(!_0x13a968)return;const _0x15a047=this[_0x5a4a34(0x179)][_0x5a4a34(0xbe)](_0x13a968[_0x5a4a34(0x17d)])[_0x5a4a34(0x140)](_0x13a968[_0x5a4a34(0x11a)]);_0x13a968[_0x5a4a34(0x195)][_0x5a4a34(0x10f)](_0x535d9c=>_0x15a047[_0x5a4a34(0x1dd)](_0x535d9c,_0x5a4a34(0x197))),this[_0x5a4a34(0xe0)][_0x5a4a34(0x17c)](_0x16151f),this[_0x5a4a34(0xe0)][_0x5a4a34(0x1ef)](_0x20e7ff,_0x13a968);});}async[_0x292fdf(0xa5)](_0x3ecd1f){const _0xca517e=_0x292fdf;this[_0xca517e(0x13b)][_0xca517e(0xe5)][_0xca517e(0x171)](_0x41286c)[_0xca517e(0x1d6)](),this[_0xca517e(0xa3)][_0xca517e(0xa6)](_0xca517e(0x1f5)),this[_0xca517e(0xa3)][_0xca517e(0xe9)](!0x0),await this[_0xca517e(0x144)]();try{await this[_0xca517e(0xad)][_0xca517e(0x1d5)](_0x3ecd1f)[_0xca517e(0x18b)](),await this[_0xca517e(0xd5)](_0x3ecd1f),this[_0xca517e(0xc1)]('\x20');const {sessionId:_0x3d3507}=this[_0xca517e(0x1ba)][_0xca517e(0x94)]();await this[_0xca517e(0x179)][_0xca517e(0x152)](_0x3ecd1f,_0x3d3507),this[_0xca517e(0x179)][_0xca517e(0x11e)]()&&this[_0xca517e(0x179)][_0xca517e(0x153)](_0x11b60c(this[_0xca517e(0x13b)][_0xca517e(0xdd)],_0xca517e(0x167)));}catch(_0x5181bf){this[_0xca517e(0xa3)][_0xca517e(0x19b)]({'errorMessage':_0x11b60c(this[_0xca517e(0x13b)][_0xca517e(0xdd)],_0xca517e(0x10e)),'id':_0x3ecd1f}),this[_0xca517e(0x100)](new _0x101c33(_0xca517e(0x1f3),this,{'error':_0x5181bf}));}finally{this[_0xca517e(0x13b)][_0xca517e(0xe5)][_0xca517e(0x171)](_0x26b979)[_0xca517e(0x1f6)][_0xca517e(0xfd)](_0xca517e(0xec)),this[_0xca517e(0xa3)][_0xca517e(0x1a8)](),this[_0xca517e(0xa3)][_0xca517e(0xa6)](_0xca517e(0xa7)),this[_0xca517e(0xa3)][_0xca517e(0xe9)](!0x1);}}[_0x292fdf(0x19e)](_0x4d71b7){const _0x19f7fb=_0x292fdf;this[_0x19f7fb(0x179)]['id']===_0x4d71b7&&this[_0x19f7fb(0xd5)]();}async[_0x292fdf(0xee)](){const _0x577f4d=_0x292fdf,_0x3d7009=this[_0x577f4d(0x1ba)][_0x577f4d(0x1be)]();this[_0x577f4d(0x179)]?.[_0x577f4d(0xd6)](_0x3d7009),this[_0x577f4d(0x179)]?.[_0x577f4d(0x153)](_0x11b60c(this[_0x577f4d(0x13b)][_0x577f4d(0xdd)],_0x577f4d(0x167)));}[_0x292fdf(0x139)](){const _0x40ada1=_0x292fdf;this[_0x40ada1(0x179)]?.[_0x40ada1(0x1f2)]();}[_0x292fdf(0x14c)](){const _0x4cdd6f=_0x292fdf;this[_0x4cdd6f(0xa3)][_0x4cdd6f(0x14c)]();}async[_0x292fdf(0x1a9)](){const _0x3c0bad=_0x292fdf;await this[_0x3c0bad(0xd5)]();}async[_0x292fdf(0x155)]({message:_0x1ffeaa,quickActionData:_0x5c135f}){const _0x4f98ad=_0x292fdf;await this[_0x4f98ad(0x125)]({'userMessage':_0x1ffeaa,'quickActionData':_0x5c135f});}[_0x292fdf(0xce)](){const _0x5277bb=_0x292fdf,_0x59d264=this[_0x5277bb(0x13b)][_0x5277bb(0xfc)][_0x5277bb(0x171)](_0x5277bb(0x1ab));if(!_0x59d264)throw new _0x101c33(_0x5277bb(0x1b9),this);return _0x59d264;}async[_0x292fdf(0xd5)](_0x569ca8){const _0x194737=_0x292fdf;try{this[_0x194737(0xa3)][_0x194737(0xfb)](),await this[_0x194737(0x181)](_0x569ca8);}catch(_0x1da5bc){this[_0x194737(0xa3)][_0x194737(0x19b)]({'errorMessage':_0x11b60c(this[_0x194737(0x13b)][_0x194737(0xdd)],_0x194737(0x129)),'id':_0x569ca8||_0x3de7ae()}),console[_0x194737(0x10d)](_0x1da5bc),this[_0x194737(0x179)]=void 0x0,this[_0x194737(0xa3)][_0x194737(0x1c6)]();}}async[_0x292fdf(0x181)](_0x245207){const _0x3c62ae=_0x292fdf,_0x2c667c=this[_0x3c62ae(0x13b)][_0x3c62ae(0xe5)][_0x3c62ae(0x171)](_0x41286c);let _0x21ead6;_0x2c667c[_0x3c62ae(0xe6)]&&_0x2c667c[_0x3c62ae(0x1d6)](),_0x245207||!this[_0x3c62ae(0x179)]?_0x21ead6=this[_0x3c62ae(0x13b)][_0x3c62ae(0xfc)][_0x3c62ae(0x171)](_0x3c62ae(0x13a)):this[_0x3c62ae(0xa3)][_0x3c62ae(0x141)]&&(_0x21ead6=this[_0x3c62ae(0x179)][_0x3c62ae(0xb7)]['id']),await this[_0x3c62ae(0x144)]();const _0xb1add7=this[_0x3c62ae(0xce)](),_0x40a7c1=_0x245207||_0x3de7ae();this[_0x3c62ae(0x179)]=new _0x2d1f1e({'connector':this[_0x3c62ae(0xad)],'chatModels':this[_0x3c62ae(0x15a)],'selectedModelId':_0x21ead6,'conversationId':_0x40a7c1,'group':_0xb1add7,'getEditor':()=>_0x226eec(this[_0x3c62ae(0x13b)])}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xea),(_0x21aa87,_0x4da377)=>{const _0x577e53=_0x3c62ae;this[_0x577e53(0xa3)][_0x577e53(0x1bb)](_0x4da377),this[_0x577e53(0xa3)][_0x577e53(0x170)](),this[_0x577e53(0xa3)][_0x577e53(0x17f)](),this[_0x577e53(0xa3)][_0x577e53(0x15d)](),_0x245207||(this[_0x577e53(0xa3)][_0x577e53(0x1df)](),this[_0x577e53(0x179)]?.[_0x577e53(0x153)](_0x11b60c(this[_0x577e53(0x13b)][_0x577e53(0xdd)],_0x577e53(0x167))));}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x14a),(_0x6148df,_0x44af6a)=>{const _0x54c36a=_0x3c62ae;this[_0x54c36a(0xa3)][_0x54c36a(0xe7)](_0x44af6a[_0x54c36a(0xbf)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xb5),(_0x209d81,_0x59ed70)=>{const _0x6a9a2c=_0x3c62ae;this[_0x6a9a2c(0xa3)][_0x6a9a2c(0x190)](_0x59ed70);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x13c),()=>{const _0x361ab7=_0x3c62ae;this[_0x361ab7(0xa3)][_0x361ab7(0x9c)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x184),()=>{const _0x194ca4=_0x3c62ae;this[_0x194ca4(0xa3)][_0x194ca4(0x9c)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xab),(_0x10173b,_0x2bd738)=>{const _0x59a498=_0x3c62ae;this[_0x59a498(0xa3)][_0x59a498(0x163)](_0x2bd738,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xb3),(_0xa5be7d,_0x57ce48)=>{const _0x77784d=_0x3c62ae;this[_0x77784d(0xa3)][_0x77784d(0x163)](_0x57ce48,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x133),()=>{const _0x1afe20=_0x3c62ae;this[_0x1afe20(0xa3)][_0x1afe20(0x18f)]();}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xdc),async()=>{const _0x20c392=_0x3c62ae;await this[_0x20c392(0xa3)][_0x20c392(0x97)]();}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x1b7),(_0xd2afdb,_0x813522)=>{const _0xa8bc19=_0x3c62ae;this[_0xa8bc19(0xa3)][_0xa8bc19(0xed)](_0x813522['id']);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x114),(_0x3a93ee,_0x54b66a,_0x3be12c)=>{const _0x51e407=_0x3c62ae;this[_0x51e407(0xc1)](_0x54b66a,_0x3be12c);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x161),(_0x4eac88,_0x3800b3)=>{const _0x34cd18=_0x3c62ae;_0x34cd18(0x177)===_0x3800b3[_0x34cd18(0xf2)]?this[_0x34cd18(0xa3)][_0x34cd18(0x137)](_0x3800b3):this[_0x34cd18(0xa3)][_0x34cd18(0x1db)](_0x3800b3);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x98),async(_0x4a18dd,_0x34bd96)=>{const _0x2f1227=_0x3c62ae;await this[_0x2f1227(0x1dc)]({'reply':_0x34bd96});}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x193),(_0x1238ef,{reply:_0x305cb1,index:_0x58f48d,state:_0x1c9ab4})=>{const _0x4752a9=_0x3c62ae;this[_0x4752a9(0xa3)][_0x4752a9(0x173)]({'id':_0x305cb1['id'],'index':_0x58f48d,'state':_0x1c9ab4});}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x1e7),(_0x465be0,_0x5d782a)=>{const _0x3459fd=_0x3c62ae;if(this[_0x3459fd(0xa3)][_0x3459fd(0x147)](_0x5d782a[_0x3459fd(0x1d3)],_0x5d782a[_0x3459fd(0x1da)]),_0x3459fd(0x180)===_0x5d782a[_0x3459fd(0x1d3)][_0x3459fd(0xf2)]){const _0x28ecb8=[..._0x226eec(this[_0x3459fd(0x13b)])[_0x3459fd(0x10a)][_0x3459fd(0x116)][_0x3459fd(0x180)][_0x3459fd(0x1cf)]()];this[_0x3459fd(0x1ba)][_0x3459fd(0xd4)](_0x28ecb8,_0x3459fd(0x1eb)+this[_0x3459fd(0x179)]?.['id']);}}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x104),(_0x53a461,_0x3aee65)=>{const _0xa016f0=_0x3c62ae;this[_0xa016f0(0xa3)][_0xa016f0(0x9e)](_0x3aee65[_0xa016f0(0x1a2)]),_0xa016f0(0x1cb)==_0x3aee65[_0xa016f0(0x1a2)]&&this[_0xa016f0(0x139)](),_0xa016f0(0x180)===_0x3aee65[_0xa016f0(0xf2)]&&this[_0xa016f0(0x1ba)][_0xa016f0(0x1c7)](_0xa016f0(0x1eb)+this[_0xa016f0(0x179)]?.['id']);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x112),(_0x2efb72,_0x4f9f84)=>{const _0x11d474=_0x3c62ae;this[_0x11d474(0xa3)][_0x11d474(0x1b6)](_0x4f9f84[_0x11d474(0x1d3)][_0x11d474(0x1a2)],_0x4f9f84[_0x11d474(0x1da)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x1ac),(_0x2d9573,_0x547e7e)=>{const _0x1a63ef=_0x3c62ae;this[_0x1a63ef(0xa3)][_0x1a63ef(0x1e5)](_0x547e7e[_0x1a63ef(0x162)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x11f),(_0x341211,_0x4ccb70)=>{const _0x4b125e=_0x3c62ae;this[_0x4b125e(0xa3)][_0x4b125e(0x14b)](_0x4ccb70[_0x4b125e(0xc0)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x1af),(_0x330ae5,_0x23842a)=>{const _0x4bf780=_0x3c62ae;this[_0x4bf780(0xa3)][_0x4bf780(0x1e0)](_0x23842a[_0x4bf780(0xd0)],_0x23842a[_0x4bf780(0xa0)],_0x23842a[_0x4bf780(0x16c)],_0x23842a[_0x4bf780(0x1d4)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x8b),(_0x144d31,_0x23ac6f)=>{const _0x42054b=_0x3c62ae;this[_0x42054b(0xa3)][_0x42054b(0x1c3)](_0x23ac6f[_0x42054b(0xd0)],_0x23ac6f[_0x42054b(0xb9)],_0x23ac6f[_0x42054b(0x1c1)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xc8),(_0x1cdc03,_0x4cf08d)=>{const _0x228177=_0x3c62ae;this[_0x228177(0xa3)][_0x228177(0x1a6)](_0x4cf08d);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0xa1),(_0x4a2acc,_0x4311e7)=>{const _0x575059=_0x3c62ae;this[_0x575059(0xa3)][_0x575059(0xdf)](_0x4311e7[_0x575059(0xb7)],_0x4311e7[_0x575059(0xc7)]);}),this[_0x3c62ae(0x179)]['on'](_0x3c62ae(0x10d),(_0x111ec9,{error:_0xafe2cf,interactionId:_0x3920ca,fileName:_0x4436a7,url:_0x9c5ec2,sourceId:_0x2ac452,sourceLabel:_0x441e0d})=>{const _0x1c2188=_0x3c62ae,_0x42f10a=_0x3920ca?_0x3920ca+':'+_0x3de7ae():_0x3de7ae();_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x1b3))?this[_0x1c2188(0xa3)][_0x1c2188(0x119)]({'staticMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x1a3)),'id':_0x42f10a}):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x13d))||_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x191))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x129)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x1ee))?this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x8f),_0x4436a7),'id':_0x42f10a}):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0xfe))?this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x95),_0x9c5ec2),'id':_0x42f10a}):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x122))?this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x1b8)),'id':_0x42f10a}):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x1ae))?this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x146)),'id':_0x42f10a}):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x13e))?(_0x2ac452&&this[_0x1c2188(0xa3)][_0x1c2188(0xb4)](_0x2ac452),this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x105),_0x441e0d||_0x1c2188(0xa0)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x131))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0xf3)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x1a7))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x1b4)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x1a1))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x185)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x16e))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x174)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x1a4))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x1c0)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):_0xafe2cf[_0x1c2188(0xfa)][_0x1c2188(0xd7)](_0x1c2188(0x17e))?(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x1ce)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf)):(this[_0x1c2188(0xa3)][_0x1c2188(0x19b)]({'errorMessage':_0x11b60c(this[_0x1c2188(0x13b)][_0x1c2188(0xdd)],_0x1c2188(0x15f)),'id':_0x42f10a}),this[_0x1c2188(0x100)](_0xafe2cf));}),await this[_0x3c62ae(0x179)][_0x3c62ae(0x1bc)](this[_0x3c62ae(0x13b)][_0x3c62ae(0xfc)][_0x3c62ae(0x171)](_0x3c62ae(0x1a0))),_0x245207||await this[_0x3c62ae(0x179)][_0x3c62ae(0xf7)]();}async[_0x292fdf(0x125)]({userMessage:_0x3128fe,quickActionData:_0x3e8e75}){const _0x309006=_0x292fdf;if(!this[_0x309006(0x179)])throw new _0x101c33(_0x309006(0x1c5));this[_0x309006(0x179)][_0x309006(0x15c)]()&&await this[_0x309006(0x179)][_0x309006(0x1b0)](this[_0x309006(0x1ba)][_0x309006(0x94)]()),this[_0x309006(0x179)]['id']&&this[_0x309006(0x179)][_0x309006(0x16a)]&&await this[_0x309006(0x179)][_0x309006(0x1cc)]({'userMessage':_0x3128fe,'quickActionData':_0x3e8e75}),this[_0x309006(0x113)]();}[_0x292fdf(0x113)](){const _0x3c7572=_0x292fdf,_0x42cf38=_0x226eec(this[_0x3c7572(0x13b)])[_0x3c7572(0x10a)],_0x5d6cd4=Array[_0x3c7572(0xb8)](_0x42cf38[_0x3c7572(0x19d)][_0x3c7572(0x12c)](_0x17a7aa));_0x42cf38[_0x3c7572(0x19f)](_0x3efb51=>{const _0x217470=_0x3c7572;_0x5d6cd4[_0x217470(0x10f)](_0x3d1364=>_0x3efb51[_0x217470(0x186)](_0x3d1364));});}[_0x292fdf(0x135)](){const _0x584279=_0x292fdf;console[_0x584279(0x1cd)](_0x584279(0xd2));}[_0x292fdf(0x1e8)](_0x138edc){const _0x57574d=_0x292fdf;this[_0x57574d(0xa3)][_0x57574d(0xca)](_0x138edc);}[_0x292fdf(0x100)](_0x5ada62){const _0x2bca58=_0x292fdf;_0x5365ce(_0x5ada62[_0x2bca58(0xfa)]);}[_0x292fdf(0x117)](_0x27ee0f){const _0x148fb8=_0x292fdf;this[_0x148fb8(0x179)]?.[_0x148fb8(0x1e2)](_0x27ee0f);}[_0x292fdf(0xa9)](){const _0x3687ad=_0x292fdf;this[_0x3687ad(0x179)]?.[_0x3687ad(0x96)]();}[_0x292fdf(0x182)](){const _0x58b68a=_0x292fdf;this[_0x58b68a(0x179)]?.[_0x58b68a(0x1d8)]();}[_0x292fdf(0x156)](_0x295073){const _0x214cc5=_0x292fdf,[_0x4ee3ae,_0x32f13e]=_0x295073[_0x214cc5(0x145)](':'),_0x50d51b=this[_0x214cc5(0x179)][_0x214cc5(0xbe)](_0x4ee3ae),_0x491d02=_0x50d51b[_0x214cc5(0x140)](_0x32f13e);return{'interaction':_0x50d51b,'reply':_0x491d02};}[_0x292fdf(0x1d7)](_0xa3744d,_0x4b9225=!0x1){const _0x271aa5=_0x292fdf,_0x432bdc=_0x226eec(this[_0x271aa5(0x13b)]),_0x44c985={'target':_0x432bdc[_0x271aa5(0x124)][_0x271aa5(0x1f6)][_0x271aa5(0x9b)][_0x271aa5(0x110)](_0x432bdc[_0x271aa5(0x124)][_0x271aa5(0xf1)][_0x271aa5(0x178)](_0xa3744d)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x4b9225};_0x4b9225&&(_0x44c985[_0x271aa5(0xf5)]=!0x0),_0xa69f74(_0x44c985);}[_0x292fdf(0xc1)](_0x401ec1,_0x577f82=!0x1){const _0x5604e8=_0x292fdf;this[_0x5604e8(0xa3)][_0x5604e8(0x114)](_0x401ec1||_0x11b60c(this[_0x5604e8(0x13b)][_0x5604e8(0xdd)],_0x5604e8(0xd9)),_0x577f82);}async[_0x292fdf(0x1dc)]({reply:_0x4cc1be,renderingStrategy:_0x4ad561}){const _0xb24823=_0x292fdf,{id:_0x70e38f,isDone:_0x27d82a,type:_0x3e1e08,parsedContent:_0x5e52f7}=_0x4cc1be;if(_0xb24823(0x149)===_0x3e1e08){const _0x558e35=_0x4cc1be[_0xb24823(0x1c9)]({'showDiff':this[_0xb24823(0xa3)][_0xb24823(0xdb)]});await this[_0xb24823(0xa3)][_0xb24823(0xe2)]({'id':_0x70e38f,'parts':_0x558e35,'renderingStrategy':_0x4ad561,'isDone':_0x27d82a});}else _0xb24823(0x177)===_0x3e1e08&&await this[_0xb24823(0xa3)][_0xb24823(0x1d1)]({'id':_0x70e38f,'parsedContent':_0x5e52f7,'renderingStrategy':_0x4ad561,'isDone':_0x27d82a});_0x27d82a&&_0x4cc1be[_0xb24823(0x1b5)][_0xb24823(0x126)]>0x0&&this[_0xb24823(0xa3)][_0xb24823(0xf4)](_0x70e38f,_0x4cc1be[_0xb24823(0x1b5)]);}async[_0x292fdf(0x144)](){const _0xdaa2a0=_0x292fdf,_0x2b1624=this[_0xdaa2a0(0x179)]?.[_0xdaa2a0(0x138)];_0x2b1624&&(_0x2b1624[_0xdaa2a0(0x1b2)](),this[_0xdaa2a0(0xa3)][_0xdaa2a0(0x11d)](_0x2b1624));}async[_0x292fdf(0xde)](){const _0x45a219=_0x292fdf,_0x1fe1d7=this[_0x45a219(0x179)]?.[_0x45a219(0x138)];if(_0x1fe1d7){for await(const _0x387ed3 of _0x1fe1d7[_0x45a219(0x1d0)])await this[_0x45a219(0x1dc)]({'reply':_0x387ed3,'renderingStrategy':_0x45a219(0x1f5)});}}[_0x292fdf(0xf9)](_0x2d0356){const _0xbc83ea=_0x292fdf,_0xf45c38={'positiveCount':_0x2d0356[_0xbc83ea(0x109)][_0xbc83ea(0x1c8)](_0x293d15=>_0xbc83ea(0x197)===_0x293d15[_0xbc83ea(0xcb)])[_0xbc83ea(0x126)],'totalCount':_0x2d0356[_0xbc83ea(0x109)][_0xbc83ea(0x126)],'modificationId':_0x2d0356['id']},_0x314b8a=this[_0xbc83ea(0x179)][_0xbc83ea(0xbe)](_0x2d0356[_0xbc83ea(0x17d)])[_0xbc83ea(0x103)];this[_0xbc83ea(0xad)][_0xbc83ea(0x132)](this[_0xbc83ea(0x179)]['id'],_0x314b8a,_0xf45c38);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3563f4=_0x47d6;(function(_0x4a70e5,_0x5ce4a2){const _0x1eb5e2=_0x47d6,_0x2870a5=_0x4a70e5();while(!![]){try{const _0x5cc71f=parseInt(_0x1eb5e2(0x7e))/0x1+parseInt(_0x1eb5e2(0x9c))/0x2+-parseInt(_0x1eb5e2(0x8a))/0x3+-parseInt(_0x1eb5e2(0xa9))/0x4*(-parseInt(_0x1eb5e2(0xcc))/0x5)+parseInt(_0x1eb5e2(0xea))/0x6*(-parseInt(_0x1eb5e2(0xc3))/0x7)+parseInt(_0x1eb5e2(0xef))/0x8*(parseInt(_0x1eb5e2(0x71))/0x9)+-parseInt(_0x1eb5e2(0x85))/0xa*(-parseInt(_0x1eb5e2(0xa2))/0xb);if(_0x5cc71f===_0x5ce4a2)break;else _0x2870a5['push'](_0x2870a5['shift']());}catch(_0x4b9690){_0x2870a5['push'](_0x2870a5['shift']());}}}(_0x2330,0xdb3cc));import{ContextPlugin as _0x57184f}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x486b0f}from'ckeditor5/src/utils.js';function _0x2330(){const _0xcb50d3=['config','_getInputPlaceholder','interactionId','remove','updateFeedItemAIReplySources','setInputPlaceholder','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','stopInteraction','children','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','values','chatFeed','forEach','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','AIChatUI','clearPendingContextUI','user-message','isOfficialPlugin','context','9hBfyzZ','setContextItemLoading','isDisabled','queueEmptyPromise','isReasoningEnabled','resetConversationTitle','updateWebSources','abort','updateFeedInteractionHeader','isPremiumPlugin','availableModels','focusPromptInput','destroy','1554362JQSjRp','enableControls','updateReplyItem','get','label','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','setConversationContext','440yPJhhE','capabilities','removeItem','ai-reply','streaming','3503127SWuCus','_getLoadingMessage','addTab','populateSourceResourceBalloon','updateResourceState','scrollFeedToSuggestion','closeSourceResourceBalloon','chatHeader','ai-suggestion-reply','then','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','_promiseQueue','addFeedItemError','set','_view','contextItems','markItemAsDone','stopAutoScroll','876050cKhXgL','filter','isDone','isWebSearchEnabled','insertSuggestion','getItemIds','181599jIdrKD','AI_CHAT_WELCOME_MESSAGE','setWebSearch','updateFeedItemAIReplySuggestionContent','areActionsDisabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','conversation-start','8eryHWB','enqueue','showDiff','commands','_isTrackChangesCommandValueBound','toggleLoadingSkeleton','requires','userMessage','updateFeedItemAIReplySuggestionPartState','AI_CHAT_HEADING','bind','removeContextItem','plugins','pluginName','removeFeedInteraction','_titleAnimationInterval','resetMessageInput','last','ai.chat.context.searchInputVisibleFrom','view','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','locale','ai.availableReplyActions','setReasoning','finishInteraction','createConversation','9814931CooxAi','feedItemRenderingStrategy','value','displayedPrompt','setIsUploadInProgress','isVisible','_animateConversationTitle','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','error-message','1286620CykYuB','markFeedItemAsDone','isModelAvailable','length','ai.chat.models.modelSelectorAlwaysVisible','</p>','disableControls','addFeedItemUserMessage','isMaximized','isTrackChangesOn','setLoadingMessage','addItem','setSelectedModel','setAddContextOptions','find','startAutoScroll','trackChanges','chatControls','clear','disableModelSelector','addFeedItemStaticMessage','addContextItem','enableModelSelector','setModel','startsWith','addFeedInteractionHeader','isPending','AITabs','TrackChanges','chat','6jiGeEZ','updateCapabilities','startInteraction','quickActionData','renderingStrategy','1875256aAGkoM','addFeedItemAIReply','setIsMaximized','isLoading','setModelList','interaction-header','options','updateFeedItemAIReplyContent','updateSuggestionPartState','delegate','clearConversationContextUI','updateSuggestionItem','showResizeButton','has','isBusy','addFeedItemAISuggestion','toggleSuggestionDisplayMode','setFeedItemRenderingStrategy','setConversationTitle','_interactionPromiseResolver','<p>','from','scrollToSuggestion'];_0x2330=function(){return _0xcb50d3;};return _0x2330();}import{AIChatView as _0x27ecae}from'./ui/aichatview.js';import{AITabs as _0x5ca0d6}from'../aitabs/aitabs.js';import{getTranslation as _0x404817}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x125337}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x543ae6}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x31cbc7}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3186af}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x47d6(_0x282cd8,_0x1ee269){const _0x23305a=_0x2330();return _0x47d6=function(_0x47d638,_0x18caf0){_0x47d638=_0x47d638-0x6f;let _0x41c0bf=_0x23305a[_0x47d638];return _0x41c0bf;},_0x47d6(_0x282cd8,_0x1ee269);}import{getEditorFromContext as _0x2ebfe9}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x4830ed}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x57184f{static get[_0x3563f4(0xaf)](){return[_0x5ca0d6];}[_0x3563f4(0x98)];static get[_0x3563f4(0xb6)](){const _0x3109e1=_0x3563f4;return _0x3109e1(0x114);}static get[_0x3563f4(0x6f)](){return!0x0;}static get[_0x3563f4(0x7a)](){return!0x0;}[_0x3563f4(0xc4)]=_0x3563f4(0x89);[_0x3563f4(0xab)]=!0x0;[_0x3563f4(0x95)];[_0x3563f4(0x102)];[_0x3563f4(0xb8)]=void 0x0;[_0x3563f4(0xad)]=!0x1;constructor(_0x2872f5){const _0x3cd9c3=_0x3563f4;super(_0x2872f5);const _0x39e399=this[_0x3cd9c3(0x70)][_0x3cd9c3(0xb5)][_0x3cd9c3(0x81)](_0x3cd9c3(0xe7));this[_0x3cd9c3(0x97)](_0x3cd9c3(0xfd),!0x1),this[_0x3cd9c3(0x95)]=new _0x31cbc7(),this[_0x3cd9c3(0x98)]=new _0x27ecae(this[_0x3cd9c3(0x70)][_0x3cd9c3(0xbe)],{'showResizeButton':_0x39e399[_0x3cd9c3(0xfb)],'contextResourcesSearchInputVisibleFrom':this[_0x3cd9c3(0x70)][_0x3cd9c3(0x106)][_0x3cd9c3(0x81)](_0x3cd9c3(0xbb))}),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xf8)](..._0x3186af)['to'](this),this[_0x3cd9c3(0x98)]['on'](_0x3cd9c3(0xff),(_0x4aac14,{showDiff:_0x5205d1})=>{const _0x44984d=_0x3cd9c3;this[_0x44984d(0xab)]=_0x5205d1;}),_0x39e399[_0x3cd9c3(0xbc)][_0x3cd9c3(0x8c)]({'id':_0x3cd9c3(0xe9),'buttonLabel':_0x404817(this[_0x3cd9c3(0x70)][_0x3cd9c3(0xbe)],_0x3cd9c3(0xb2)),'buttonIcon':_0x125337,'order':0x0,'content':this[_0x3cd9c3(0x98)]}),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)][_0x3cd9c3(0xb3)](_0x3cd9c3(0xf2))['to'](this,_0x3cd9c3(0xfd),_0x521b0c=>_0x521b0c),this[_0x3cd9c3(0x98)][_0x3cd9c3(0x111)][_0x3cd9c3(0xb3)](_0x3cd9c3(0xe6))['to'](this,_0x3cd9c3(0xfd),_0x2d2986=>_0x2d2986),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)][_0x3cd9c3(0x10b)](this[_0x3cd9c3(0x107)]()),this[_0x3cd9c3(0xb3)](_0x3cd9c3(0xce))['to'](this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)],_0x3cd9c3(0xce));}[_0x3563f4(0x7d)](){const _0x6d56fd=_0x3563f4;super[_0x6d56fd(0x7d)](),this[_0x6d56fd(0xb8)]&&clearInterval(this[_0x6d56fd(0xb8)]);}[_0x3563f4(0xc2)](_0x531e3e){const _0x16e8ae=_0x3563f4;this[_0x16e8ae(0x98)][_0x16e8ae(0x111)][_0x16e8ae(0xde)](),this[_0x16e8ae(0x98)][_0x16e8ae(0xdd)][_0x16e8ae(0xe2)](),this[_0x16e8ae(0x98)][_0x16e8ae(0xdd)][_0x16e8ae(0xf3)](_0x531e3e[_0x16e8ae(0x7b)],!this[_0x16e8ae(0x70)][_0x16e8ae(0x106)][_0x16e8ae(0x81)](_0x16e8ae(0xd0))),this[_0x16e8ae(0xe0)]({'id':_0x16e8ae(0xa8),'staticMessage':_0x404817(this[_0x16e8ae(0x70)][_0x16e8ae(0xbe)],_0x16e8ae(0xa3))});}[_0x3563f4(0xe0)]({id:_0x5212f0,staticMessage:_0x309ae8}){const _0x1b5a79=_0x3563f4;this[_0x1b5a79(0x98)][_0x1b5a79(0x111)][_0x1b5a79(0xd7)](_0x1b5a79(0x88),{'id':_0x5212f0,'initialContent':_0x1b5a79(0x103)+_0x309ae8+_0x1b5a79(0xd1)});}[_0x3563f4(0xd3)](_0x501074){const _0x287b92=_0x3563f4,_0x4a22a3=_0x501074[_0x287b92(0xed)]?.[_0x287b92(0xc6)]||_0x501074[_0x287b92(0xb0)];this[_0x287b92(0x98)][_0x287b92(0x111)][_0x287b92(0xd7)](_0x287b92(0x116),{'contextItems':Array[_0x287b92(0x104)](_0x501074[_0x287b92(0x99)][_0x287b92(0x110)]()),'initialContent':_0x287b92(0x103)+_0x4a22a3+_0x287b92(0xd1),'id':_0x501074['id']});}[_0x3563f4(0x96)]({errorMessage:_0x3a1733,id:_0x4c1c88}){const _0x511e4f=_0x3563f4;this[_0x511e4f(0x98)][_0x511e4f(0x111)][_0x511e4f(0xd7)](_0x511e4f(0xcb),{'initialContent':_0x511e4f(0x103)+_0x3a1733+_0x511e4f(0xd1),'id':_0x4c1c88});}[_0x3563f4(0xf0)](_0x1e5b55){const _0x1b22e7=_0x3563f4;return this[_0x1b22e7(0x95)][_0x1b22e7(0xaa)](async()=>{const _0x1f09b0=_0x1b22e7;this[_0x1f09b0(0x98)][_0x1f09b0(0x111)][_0x1f09b0(0xd7)](_0x1f09b0(0x88),{'id':_0x1e5b55[_0x1f09b0(0x108)]+':'+_0x1e5b55['id']}),this[_0x1f09b0(0xd6)](null);});}async[_0x3563f4(0xfe)](_0x2b00a4){const _0x19df24=_0x3563f4,_0x17274b=_0x2ebfe9(this[_0x19df24(0x70)]);let _0x89c813=_0x17274b[_0x19df24(0x106)][_0x19df24(0x81)](_0x19df24(0xbf))||[..._0x4830ed];if(_0x17274b[_0x19df24(0xb5)][_0x19df24(0xfc)](_0x19df24(0xe8))){if(!this[_0x19df24(0xad)]){this[_0x19df24(0xad)]=!0x0;const _0x963930=_0x17274b[_0x19df24(0xac)][_0x19df24(0x81)](_0x19df24(0xdc));this[_0x19df24(0x98)][_0x19df24(0x111)][_0x19df24(0xb3)](_0x19df24(0xd5))['to'](_0x963930,_0x19df24(0xc5));}}else _0x89c813=_0x89c813[_0x19df24(0x9d)](_0x507df7=>_0x19df24(0xa0)!=_0x507df7);return this[_0x19df24(0x95)][_0x19df24(0xaa)](async()=>{const _0x3285ad=_0x19df24;this[_0x3285ad(0x98)][_0x3285ad(0x111)][_0x3285ad(0xd7)](_0x3285ad(0x92),{'id':_0x2b00a4[_0x3285ad(0x108)]+':'+_0x2b00a4['id'],'areActionsDisabled':_0x2b00a4[_0x3285ad(0xa6)],'showDiff':this[_0x3285ad(0xab)],'availableActions':_0x89c813}),this[_0x3285ad(0xd6)](null);});}[_0x3563f4(0xe5)](_0x52c381,_0x534dab){const _0x425992=_0x3563f4,_0x579231=this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0x10e)][_0x425992(0xba)];if(_0x579231 instanceof _0x543ae6)return this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0x10e)][_0x425992(0x109)](_0x579231),void this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0xd7)](_0x425992(0xf4),{'id':_0x52c381['id'],'capabilities':{'isWebSearchEnabled':_0x579231[_0x425992(0x86)][_0x425992(0x9f)]||_0x534dab[_0x425992(0x9f)],'isReasoningEnabled':_0x579231[_0x425992(0x86)][_0x425992(0x75)]||_0x534dab[_0x425992(0x75)]}});this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0xd7)](_0x425992(0xf4),{'id':_0x52c381['id'],'capabilities':_0x534dab});}[_0x3563f4(0x79)](_0x249f73){const _0x20d0e6=_0x3563f4,_0x3a49c8=this[_0x20d0e6(0x98)][_0x20d0e6(0x111)][_0x20d0e6(0x10e)][_0x20d0e6(0xda)](_0x4053fd=>_0x4053fd[_0x20d0e6(0xf5)]['id']==_0x249f73['id']&&_0x4053fd instanceof _0x543ae6);_0x3a49c8&&_0x3a49c8[_0x20d0e6(0x97)](_0x20d0e6(0xc8),_0x249f73[_0x20d0e6(0xc8)]);}async[_0x3563f4(0xf6)](_0x1b2e34){const _0x1c2a73=_0x3563f4,_0x47ee52=_0x1b2e34[_0x1c2a73(0xee)]||this[_0x1c2a73(0xc4)];return this[_0x1c2a73(0x95)][_0x1c2a73(0xaa)](async _0x10ce57=>{const _0xeb8cd1=_0x1c2a73;await this[_0xeb8cd1(0x98)][_0xeb8cd1(0x111)][_0xeb8cd1(0x80)]({..._0x1b2e34,'abortSignal':_0x10ce57,'renderingStrategy':_0x47ee52}),_0x1b2e34[_0xeb8cd1(0x9e)]&&this[_0xeb8cd1(0xcd)](_0x1b2e34['id']);});}[_0x3563f4(0x10a)](_0x58474c,_0x3a6865){const _0x26bfe6=_0x3563f4;this[_0x26bfe6(0x98)][_0x26bfe6(0x111)][_0x26bfe6(0x77)](_0x58474c,_0x3a6865);}async[_0x3563f4(0xa5)](_0x104600){const _0x312b88=_0x3563f4,_0x38c910=_0x104600[_0x312b88(0xee)]||this[_0x312b88(0xc4)];return this[_0x312b88(0x95)][_0x312b88(0xaa)](async _0x2ff6f0=>{const _0x34c700=_0x312b88;await this[_0x34c700(0x98)][_0x34c700(0x111)][_0x34c700(0xfa)]({..._0x104600,'abortSignal':_0x2ff6f0,'renderingStrategy':_0x38c910}),_0x104600[_0x34c700(0x9e)]&&this[_0x34c700(0xcd)](_0x104600['id']);});}[_0x3563f4(0xb1)](_0x26ed28){const _0x19d638=_0x3563f4;this[_0x19d638(0x98)][_0x19d638(0x111)][_0x19d638(0xf7)](_0x26ed28);}[_0x3563f4(0xcd)](_0x5be70e){const _0x1fa41a=_0x3563f4;this[_0x1fa41a(0x98)][_0x1fa41a(0x111)][_0x1fa41a(0x9a)](_0x5be70e);}[_0x3563f4(0xb7)](_0x56e106){const _0xa27bc0=_0x3563f4;this[_0xa27bc0(0x98)][_0xa27bc0(0x111)][_0xa27bc0(0xa1)]()[_0xa27bc0(0x9d)](_0x5cfdfc=>_0x5cfdfc[_0xa27bc0(0xe4)](_0x56e106))[_0xa27bc0(0x112)](_0x2850ff=>this[_0xa27bc0(0x98)][_0xa27bc0(0x111)][_0xa27bc0(0x87)](_0x2850ff));}[_0x3563f4(0xec)](){const _0xc2f161=_0x3563f4;this[_0xc2f161(0xd6)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0xc2f161(0x98)][_0xc2f161(0xdd)][_0xc2f161(0xdf)](!this[_0xc2f161(0x70)][_0xc2f161(0x106)][_0xc2f161(0x81)](_0xc2f161(0xd0))),this[_0xc2f161(0xfd)]=!0x0,this[_0xc2f161(0x98)][_0xc2f161(0x111)][_0xc2f161(0xdb)]();}[_0x3563f4(0x10d)](_0x263c87){const _0x1af40b=_0x3563f4;this[_0x1af40b(0x95)][_0x1af40b(0x78)](),this[_0x1af40b(0x98)][_0x1af40b(0x111)][_0x1af40b(0xa1)]()[_0x1af40b(0x9d)](_0x295456=>_0x295456[_0x1af40b(0xe4)](_0x263c87['id']))[_0x1af40b(0x112)](_0x38e6ee=>this[_0x1af40b(0xcd)](_0x38e6ee)),this[_0x1af40b(0xfd)]=!0x1,this[_0x1af40b(0x98)][_0x1af40b(0x111)][_0x1af40b(0x9b)]();}async[_0x3563f4(0xc1)](){const _0x1155a7=_0x3563f4;return this[_0x1155a7(0x95)][_0x1155a7(0x74)][_0x1155a7(0x93)](()=>{const _0x2d58a1=_0x1155a7;this[_0x2d58a1(0xfd)]=!0x1,this[_0x2d58a1(0x98)][_0x2d58a1(0x111)][_0x2d58a1(0x9b)]();});}[_0x3563f4(0xe1)](_0x1d2b34,_0x317379){const _0x577dea=_0x3563f4;this[_0x577dea(0x98)][_0x577dea(0xdd)][_0x577dea(0xe1)](_0x1d2b34,_0x317379);}[_0x3563f4(0xb4)](_0x4cdb71){const _0x38578c=_0x3563f4;this[_0x38578c(0x98)][_0x38578c(0xdd)][_0x38578c(0xb4)](_0x4cdb71);}[_0x3563f4(0x72)](_0x2d6cf5,_0x238490){const _0x3e14f5=_0x3563f4;this[_0x3e14f5(0x98)][_0x3e14f5(0xdd)][_0x3e14f5(0x72)](_0x2d6cf5,_0x238490);}[_0x3563f4(0xc7)](_0x21d9b4){const _0x875e6d=_0x3563f4;this[_0x875e6d(0x98)][_0x875e6d(0xdd)][_0x875e6d(0xc7)](_0x21d9b4);}[_0x3563f4(0x84)](_0x34ed8e){const _0x521b7a=_0x3563f4;this[_0x521b7a(0x98)][_0x521b7a(0xdd)][_0x521b7a(0x84)](_0x34ed8e);}[_0x3563f4(0x115)](){const _0x4db0c7=_0x3563f4;this[_0x4db0c7(0x98)][_0x4db0c7(0xdd)][_0x4db0c7(0x115)]();}[_0x3563f4(0xf9)](){const _0x2c5749=_0x3563f4;this[_0x2c5749(0x98)][_0x2c5749(0xdd)][_0x2c5749(0xf9)]();}[_0x3563f4(0x8e)](_0x3725a8,_0xf8e643,_0x57e044){const _0x4392cf=_0x3563f4;this[_0x4392cf(0x98)][_0x4392cf(0xdd)][_0x4392cf(0x8e)](_0x3725a8,_0xf8e643,_0x57e044);}[_0x3563f4(0xb9)](){const _0x2ec29c=_0x3563f4;this[_0x2ec29c(0x98)][_0x2ec29c(0xdd)][_0x2ec29c(0xb9)](),this[_0x2ec29c(0x98)][_0x2ec29c(0xdd)][_0x2ec29c(0x10b)](this[_0x2ec29c(0x107)]());}[_0x3563f4(0xd9)](_0x5f106f){const _0x26f8e8=_0x3563f4;this[_0x26f8e8(0x98)][_0x26f8e8(0xdd)][_0x26f8e8(0xd9)](_0x5f106f);}[_0x3563f4(0xeb)](_0x59a133){const _0x394e9d=_0x3563f4;this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0xa4)](_0x59a133[_0x394e9d(0x9f)]),this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0xc0)](_0x59a133[_0x394e9d(0x75)]),this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0x10b)](this[_0x394e9d(0x107)](_0x59a133));}[_0x3563f4(0xd8)](_0x210b4d,_0x329264){const _0x5a779b=_0x3563f4;this[_0x5a779b(0x98)][_0x5a779b(0xdd)][_0x5a779b(0xe3)](_0x210b4d),_0x329264&&this[_0x5a779b(0x98)][_0x5a779b(0xdd)][_0x5a779b(0xdf)](!0x1);}[_0x3563f4(0x100)](_0x425108){const _0x2ea85d=_0x3563f4;this[_0x2ea85d(0xc4)]=_0x425108;}[_0x3563f4(0xae)](_0x176e97){const _0x2b7a5f=_0x3563f4;this[_0x2b7a5f(0x98)][_0x2b7a5f(0x111)][_0x2b7a5f(0xae)](_0x176e97);}[_0x3563f4(0x76)](){const _0x48f049=_0x3563f4;this[_0x48f049(0x101)](_0x404817(this[_0x48f049(0x70)][_0x48f049(0xbe)],_0x48f049(0xb2)));}[_0x3563f4(0x101)](_0x5d8152,_0x1d7e21=!0x1){const _0x4380cf=_0x3563f4;if(_0x1d7e21&&!_0x486b0f()&&_0x5d8152[_0x4380cf(0xcf)])return this[_0x4380cf(0x98)][_0x4380cf(0x91)][_0x4380cf(0x82)]='',void this[_0x4380cf(0xc9)](_0x5d8152);this[_0x4380cf(0x98)][_0x4380cf(0x91)][_0x4380cf(0x82)]=_0x5d8152;}[_0x3563f4(0xd6)](_0x6cf509){const _0x41ad85=_0x3563f4,_0x4c66b0=this[_0x41ad85(0x8b)](_0x6cf509);this[_0x41ad85(0x98)][_0x41ad85(0x111)][_0x41ad85(0xd6)](_0x4c66b0);}[_0x3563f4(0xc9)](_0x140578){const _0x4a47b7=_0x3563f4;let _0x427745=0x0;clearInterval(this[_0x4a47b7(0xb8)]),this[_0x4a47b7(0xb8)]=setInterval(()=>{const _0x335346=_0x4a47b7;this[_0x335346(0x98)][_0x335346(0x91)][_0x335346(0x82)]=this[_0x335346(0x98)][_0x335346(0x91)][_0x335346(0x82)]+_0x140578[_0x427745],_0x427745++,_0x427745===_0x140578[_0x335346(0xcf)]&&clearInterval(this[_0x335346(0xb8)]);},0x1e);}[_0x3563f4(0xf1)](_0x39d919){const _0x246323=_0x3563f4;this[_0x246323(0x98)][_0x246323(0x91)][_0x246323(0xd4)]=_0x39d919;}[_0x3563f4(0x8b)](_0x3ee2ae){const _0x363fbd=_0x3563f4;return _0x3ee2ae?_0x3ee2ae[_0x363fbd(0x9f)]&&_0x3ee2ae[_0x363fbd(0x75)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x83)):_0x3ee2ae[_0x363fbd(0x9f)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0xbd)):_0x3ee2ae[_0x363fbd(0x75)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x113)):_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x10c)):'';}[_0x3563f4(0x107)](_0x1cab42){const _0x456fb1=_0x3563f4;return _0x1cab42?_0x1cab42[_0x456fb1(0x9f)]&&_0x1cab42[_0x456fb1(0x75)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0xca)):_0x1cab42[_0x456fb1(0x9f)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x94)):_0x1cab42[_0x456fb1(0x75)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0xa7)):_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x10f)):_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x10f));}[_0x3563f4(0x8d)](_0x4af396,_0x4ac97d,_0x66695b,_0x2ea41f){const _0x890dc0=_0x3563f4;this[_0x890dc0(0x98)][_0x890dc0(0x8d)](_0x4af396,_0x4ac97d,_0x66695b,_0x2ea41f);}[_0x3563f4(0x90)](_0x149d9d){const _0x413ebf=_0x3563f4;this[_0x413ebf(0x98)][_0x413ebf(0x90)](_0x149d9d);}[_0x3563f4(0x7c)](){const _0xf80f6a=_0x3563f4;this[_0xf80f6a(0x98)][_0xf80f6a(0xdd)][_0xf80f6a(0x7c)]();}[_0x3563f4(0x8f)](_0x167568,_0x554ddd){const _0x3bb4b0=_0x3563f4;this[_0x3bb4b0(0x98)][_0x3bb4b0(0x111)][_0x3bb4b0(0x105)](_0x167568,_0x554ddd);}[_0x3563f4(0xdb)](){const _0x248ed6=_0x3563f4;this[_0x248ed6(0x98)][_0x248ed6(0x111)][_0x248ed6(0xdb)]();}[_0x3563f4(0xd2)](){const _0x3ed8e7=_0x3563f4;this[_0x3ed8e7(0x98)][_0x3ed8e7(0xdd)][_0x3ed8e7(0x73)]=!0x0;}[_0x3563f4(0x7f)](){const _0x3c3eec=_0x3563f4;this[_0x3c3eec(0x98)][_0x3c3eec(0xdd)][_0x3c3eec(0x73)]=!0x1;}}
23
+ const _0x4e3e1b=_0x3fdc;(function(_0x34567e,_0x4be82d){const _0x50cec1=_0x3fdc,_0x3491b4=_0x34567e();while(!![]){try{const _0x2bafce=-parseInt(_0x50cec1(0x187))/0x1*(parseInt(_0x50cec1(0x105))/0x2)+-parseInt(_0x50cec1(0x1a4))/0x3*(parseInt(_0x50cec1(0x111))/0x4)+-parseInt(_0x50cec1(0x115))/0x5+-parseInt(_0x50cec1(0x113))/0x6+parseInt(_0x50cec1(0x19c))/0x7+-parseInt(_0x50cec1(0x139))/0x8+parseInt(_0x50cec1(0x198))/0x9;if(_0x2bafce===_0x4be82d)break;else _0x3491b4['push'](_0x3491b4['shift']());}catch(_0xd66b46){_0x3491b4['push'](_0x3491b4['shift']());}}}(_0x54d1,0xa54a2));import{ContextPlugin as _0x330b0f}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x262090}from'ckeditor5/src/utils.js';import{AIChatView as _0x21655f}from'./ui/aichatview.js';import{AITabs as _0x5da74f}from'../aitabs/aitabs.js';function _0x54d1(){const _0x3ca6bc=['closeSourceResourceBalloon','isWebSearchEnabled','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','AI_CHAT_HEADING','enqueue','updateFeedItemAIReplySources','value','chatHeader','TrackChanges','setModel','scrollToSuggestion','ai.chat.context.searchInputVisibleFrom','disableControls','queueEmptyPromise','removeFeedInteraction','clear','interactionId','scrollFeedToSuggestion','conversation-start','resetMessageInput','bind','toggleSuggestionDisplayMode','_interactionPromiseResolver','28523dESklp','updateSuggestionItem','chatControls','user-message','ai-suggestion-reply','updateResourceState','setAddContextOptions','isBusy','finishInteraction','view','destroy','setConversationContext','find','addFeedItemStaticMessage','updateFeedItemAIReplySuggestionContent','updateFeedItemAIReplyContent','requires','28165041rHyPBu','setIsMaximized','setFeedItemRenderingStrategy','<p>','3069395UBgtye','length','createConversation','insertSuggestion','ai.chat.models.modelSelectorAlwaysVisible','addFeedItemError','chatFeed','AIChatUI','184218CSKeHj','renderingStrategy','children','values','addContextItem','then','updateReplyItem','28nGSfQS','focusPromptInput','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','setConversationTitle','abort','_promiseQueue','isModelAvailable','from','isLoading','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','interaction-header','8JXIUFH','feedItemRenderingStrategy','3407442GVYpDV','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','2288385CWKDAi','displayedPrompt','startAutoScroll','showResizeButton','error-message','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','updateFeedItemAIReplySuggestionPartState','resetConversationTitle','plugins','delegate','markFeedItemAsDone','chat','setWebSearch','stopInteraction','locale','setContextItemLoading','setModelList','quickActionData','ai-reply','populateSourceResourceBalloon','addFeedItemAISuggestion','forEach','remove','AITabs','isTrackChangesOn','capabilities','toggleLoadingSkeleton','pluginName','getItemIds','addItem','setSelectedModel','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','setIsUploadInProgress','enableModelSelector','_view','updateFeedInteractionHeader','10745520YJJILc','config','setInputPlaceholder','streaming','markItemAsDone','setReasoning','context','isDisabled','contextItems','disableModelSelector','get','filter','label','addFeedInteractionHeader','isDone','updateWebSources','set','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','</p>','isPremiumPlugin','addTab','_getLoadingMessage','_titleAnimationInterval','_animateConversationTitle','commands','isMaximized','addFeedItemUserMessage','stopAutoScroll','has','updateCapabilities','addFeedItemAIReply','clearPendingContextUI','isPending','removeContextItem','userMessage','ai.availableReplyActions','areActionsDisabled','last','isReasoningEnabled','isOfficialPlugin','_isTrackChangesCommandValueBound','clearConversationContextUI','setLoadingMessage','startInteraction','isVisible','_getInputPlaceholder','removeItem','showDiff','options','AI_CHAT_WELCOME_MESSAGE','updateSuggestionPartState','startsWith','enableControls','trackChanges','availableModels'];_0x54d1=function(){return _0x3ca6bc;};return _0x54d1();}import{getTranslation as _0x273aee}from'../aicore/utils/common-translations.js';import{IconAIChat as _0xd84c93}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x49c1a5}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x48b8dd}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x2a81b1}from'./utils/eventnames.js';function _0x3fdc(_0x5a9afb,_0x1031e7){const _0x54d14e=_0x54d1();return _0x3fdc=function(_0x3fdc7c,_0x405c7a){_0x3fdc7c=_0x3fdc7c-0x104;let _0x26091e=_0x54d14e[_0x3fdc7c];return _0x26091e;},_0x3fdc(_0x5a9afb,_0x1031e7);}import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x37b722}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x10fd3f}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x330b0f{static get[_0x4e3e1b(0x197)](){return[_0x5da74f];}[_0x4e3e1b(0x137)];static get[_0x4e3e1b(0x130)](){const _0x556d3a=_0x4e3e1b;return _0x556d3a(0x1a3);}static get[_0x4e3e1b(0x160)](){return!0x0;}static get[_0x4e3e1b(0x14c)](){return!0x0;}[_0x4e3e1b(0x112)]=_0x4e3e1b(0x13c);[_0x4e3e1b(0x168)]=!0x0;[_0x4e3e1b(0x10b)];[_0x4e3e1b(0x186)];[_0x4e3e1b(0x14f)]=void 0x0;[_0x4e3e1b(0x161)]=!0x1;constructor(_0x3e39f3){const _0x187bdb=_0x4e3e1b;super(_0x3e39f3);const _0x3280d6=this[_0x187bdb(0x13f)][_0x187bdb(0x11d)][_0x187bdb(0x143)](_0x187bdb(0x12c));this[_0x187bdb(0x149)](_0x187bdb(0x18e),!0x1),this[_0x187bdb(0x10b)]=new _0x48b8dd(),this[_0x187bdb(0x137)]=new _0x21655f(this[_0x187bdb(0x13f)][_0x187bdb(0x123)],{'showResizeButton':_0x3280d6[_0x187bdb(0x118)],'contextResourcesSearchInputVisibleFrom':this[_0x187bdb(0x13f)][_0x187bdb(0x13a)][_0x187bdb(0x143)](_0x187bdb(0x17b))}),this[_0x187bdb(0x137)][_0x187bdb(0x11e)](..._0x2a81b1)['to'](this),this[_0x187bdb(0x137)]['on'](_0x187bdb(0x185),(_0x3e61a6,{showDiff:_0x182b2a})=>{const _0xee3b6a=_0x187bdb;this[_0xee3b6a(0x168)]=_0x182b2a;}),_0x3280d6[_0x187bdb(0x190)][_0x187bdb(0x14d)]({'id':_0x187bdb(0x120),'buttonLabel':_0x273aee(this[_0x187bdb(0x13f)][_0x187bdb(0x123)],_0x187bdb(0x173)),'buttonIcon':_0xd84c93,'order':0x0,'content':this[_0x187bdb(0x137)]}),this[_0x187bdb(0x137)][_0x187bdb(0x189)][_0x187bdb(0x184)](_0x187bdb(0x10e))['to'](this,_0x187bdb(0x18e),_0x142dbb=>_0x142dbb),this[_0x187bdb(0x137)][_0x187bdb(0x1a2)][_0x187bdb(0x184)](_0x187bdb(0x159))['to'](this,_0x187bdb(0x18e),_0x222297=>_0x222297),this[_0x187bdb(0x137)][_0x187bdb(0x189)][_0x187bdb(0x13b)](this[_0x187bdb(0x166)]()),this[_0x187bdb(0x184)](_0x187bdb(0x10c))['to'](this[_0x187bdb(0x137)][_0x187bdb(0x189)],_0x187bdb(0x10c));}[_0x4e3e1b(0x191)](){const _0x3ff838=_0x4e3e1b;super[_0x3ff838(0x191)](),this[_0x3ff838(0x14f)]&&clearInterval(this[_0x3ff838(0x14f)]);}[_0x4e3e1b(0x19e)](_0x334de5){const _0x1c46dd=_0x4e3e1b;this[_0x1c46dd(0x137)][_0x1c46dd(0x1a2)][_0x1c46dd(0x17f)](),this[_0x1c46dd(0x137)][_0x1c46dd(0x189)][_0x1c46dd(0x136)](),this[_0x1c46dd(0x137)][_0x1c46dd(0x189)][_0x1c46dd(0x125)](_0x334de5[_0x1c46dd(0x16f)],!this[_0x1c46dd(0x13f)][_0x1c46dd(0x13a)][_0x1c46dd(0x143)](_0x1c46dd(0x1a0))),this[_0x1c46dd(0x194)]({'id':_0x1c46dd(0x182),'staticMessage':_0x273aee(this[_0x1c46dd(0x13f)][_0x1c46dd(0x123)],_0x1c46dd(0x16a))});}[_0x4e3e1b(0x194)]({id:_0x24a09f,staticMessage:_0x3f8a2d}){const _0x8bb6dc=_0x4e3e1b;this[_0x8bb6dc(0x137)][_0x8bb6dc(0x1a2)][_0x8bb6dc(0x132)](_0x8bb6dc(0x127),{'id':_0x24a09f,'initialContent':_0x8bb6dc(0x19b)+_0x3f8a2d+_0x8bb6dc(0x14b)});}[_0x4e3e1b(0x153)](_0x1c0f81){const _0x3c06b9=_0x4e3e1b,_0x459080=_0x1c0f81[_0x3c06b9(0x126)]?.[_0x3c06b9(0x116)]||_0x1c0f81[_0x3c06b9(0x15b)];this[_0x3c06b9(0x137)][_0x3c06b9(0x1a2)][_0x3c06b9(0x132)](_0x3c06b9(0x18a),{'contextItems':Array[_0x3c06b9(0x10d)](_0x1c0f81[_0x3c06b9(0x141)][_0x3c06b9(0x1a7)]()),'initialContent':_0x3c06b9(0x19b)+_0x459080+_0x3c06b9(0x14b),'id':_0x1c0f81['id']});}[_0x4e3e1b(0x1a1)]({errorMessage:_0x5c997d,id:_0x256ae3}){const _0x22bebe=_0x4e3e1b;this[_0x22bebe(0x137)][_0x22bebe(0x1a2)][_0x22bebe(0x132)](_0x22bebe(0x119),{'initialContent':_0x22bebe(0x19b)+_0x5c997d+_0x22bebe(0x14b),'id':_0x256ae3});}[_0x4e3e1b(0x157)](_0x171095){const _0x35db8b=_0x4e3e1b;return this[_0x35db8b(0x10b)][_0x35db8b(0x174)](async()=>{const _0x48204c=_0x35db8b;this[_0x48204c(0x137)][_0x48204c(0x1a2)][_0x48204c(0x132)](_0x48204c(0x127),{'id':_0x171095[_0x48204c(0x180)]+':'+_0x171095['id']}),this[_0x48204c(0x163)](null);});}async[_0x4e3e1b(0x129)](_0x332724){const _0x1f65d0=_0x4e3e1b,_0x312c4a=_0x37b722(this[_0x1f65d0(0x13f)]);let _0x37815f=_0x312c4a[_0x1f65d0(0x13a)][_0x1f65d0(0x143)](_0x1f65d0(0x15c))||[..._0x10fd3f];if(_0x312c4a[_0x1f65d0(0x11d)][_0x1f65d0(0x155)](_0x1f65d0(0x178))){if(!this[_0x1f65d0(0x161)]){this[_0x1f65d0(0x161)]=!0x0;const _0x4c2a27=_0x312c4a[_0x1f65d0(0x151)][_0x1f65d0(0x143)](_0x1f65d0(0x16e));this[_0x1f65d0(0x137)][_0x1f65d0(0x1a2)][_0x1f65d0(0x184)](_0x1f65d0(0x12d))['to'](_0x4c2a27,_0x1f65d0(0x176));}}else _0x37815f=_0x37815f[_0x1f65d0(0x144)](_0x34ed90=>_0x1f65d0(0x19f)!=_0x34ed90);return this[_0x1f65d0(0x10b)][_0x1f65d0(0x174)](async()=>{const _0x44e751=_0x1f65d0;this[_0x44e751(0x137)][_0x44e751(0x1a2)][_0x44e751(0x132)](_0x44e751(0x18b),{'id':_0x332724[_0x44e751(0x180)]+':'+_0x332724['id'],'areActionsDisabled':_0x332724[_0x44e751(0x15d)],'showDiff':this[_0x44e751(0x168)],'availableActions':_0x37815f}),this[_0x44e751(0x163)](null);});}[_0x4e3e1b(0x146)](_0x4e3e1d,_0x2aac8e){const _0x77a190=_0x4e3e1b,_0x429050=this[_0x77a190(0x137)][_0x77a190(0x1a2)][_0x77a190(0x1a6)][_0x77a190(0x15e)];if(_0x429050 instanceof _0x49c1a5)return this[_0x77a190(0x137)][_0x77a190(0x1a2)][_0x77a190(0x1a6)][_0x77a190(0x12b)](_0x429050),void this[_0x77a190(0x137)][_0x77a190(0x1a2)][_0x77a190(0x132)](_0x77a190(0x110),{'id':_0x4e3e1d['id'],'capabilities':{'isWebSearchEnabled':_0x429050[_0x77a190(0x12e)][_0x77a190(0x171)]||_0x2aac8e[_0x77a190(0x171)],'isReasoningEnabled':_0x429050[_0x77a190(0x12e)][_0x77a190(0x15f)]||_0x2aac8e[_0x77a190(0x15f)]}});this[_0x77a190(0x137)][_0x77a190(0x1a2)][_0x77a190(0x132)](_0x77a190(0x110),{'id':_0x4e3e1d['id'],'capabilities':_0x2aac8e});}[_0x4e3e1b(0x138)](_0x548f08){const _0x3029f9=_0x4e3e1b,_0xcae46d=this[_0x3029f9(0x137)][_0x3029f9(0x1a2)][_0x3029f9(0x1a6)][_0x3029f9(0x193)](_0x191344=>_0x191344[_0x3029f9(0x169)]['id']==_0x548f08['id']&&_0x191344 instanceof _0x49c1a5);_0xcae46d&&_0xcae46d[_0x3029f9(0x149)](_0x3029f9(0x165),_0x548f08[_0x3029f9(0x165)]);}async[_0x4e3e1b(0x196)](_0x3a16a3){const _0x520f10=_0x4e3e1b,_0x502071=_0x3a16a3[_0x520f10(0x1a5)]||this[_0x520f10(0x112)];return this[_0x520f10(0x10b)][_0x520f10(0x174)](async _0x2b705e=>{const _0x108ca7=_0x520f10;await this[_0x108ca7(0x137)][_0x108ca7(0x1a2)][_0x108ca7(0x104)]({..._0x3a16a3,'abortSignal':_0x2b705e,'renderingStrategy':_0x502071}),_0x3a16a3[_0x108ca7(0x147)]&&this[_0x108ca7(0x11f)](_0x3a16a3['id']);});}[_0x4e3e1b(0x175)](_0x465c5b,_0xe45395){const _0x1e32d7=_0x4e3e1b;this[_0x1e32d7(0x137)][_0x1e32d7(0x1a2)][_0x1e32d7(0x148)](_0x465c5b,_0xe45395);}async[_0x4e3e1b(0x195)](_0x29a328){const _0x599ccd=_0x4e3e1b,_0x2bca9b=_0x29a328[_0x599ccd(0x1a5)]||this[_0x599ccd(0x112)];return this[_0x599ccd(0x10b)][_0x599ccd(0x174)](async _0x156676=>{const _0x1840ce=_0x599ccd;await this[_0x1840ce(0x137)][_0x1840ce(0x1a2)][_0x1840ce(0x188)]({..._0x29a328,'abortSignal':_0x156676,'renderingStrategy':_0x2bca9b}),_0x29a328[_0x1840ce(0x147)]&&this[_0x1840ce(0x11f)](_0x29a328['id']);});}[_0x4e3e1b(0x11b)](_0x2b14bf){const _0x41cef5=_0x4e3e1b;this[_0x41cef5(0x137)][_0x41cef5(0x1a2)][_0x41cef5(0x16b)](_0x2b14bf);}[_0x4e3e1b(0x11f)](_0xb267ed){const _0x4bf56f=_0x4e3e1b;this[_0x4bf56f(0x137)][_0x4bf56f(0x1a2)][_0x4bf56f(0x13d)](_0xb267ed);}[_0x4e3e1b(0x17e)](_0x504a06){const _0x31a47f=_0x4e3e1b;this[_0x31a47f(0x137)][_0x31a47f(0x1a2)][_0x31a47f(0x131)]()[_0x31a47f(0x144)](_0x2a66a7=>_0x2a66a7[_0x31a47f(0x16c)](_0x504a06))[_0x31a47f(0x12a)](_0x435f20=>this[_0x31a47f(0x137)][_0x31a47f(0x1a2)][_0x31a47f(0x167)](_0x435f20));}[_0x4e3e1b(0x164)](){const _0xef4361=_0x4e3e1b;this[_0xef4361(0x163)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0xef4361(0x137)][_0xef4361(0x189)][_0xef4361(0x142)](!this[_0xef4361(0x13f)][_0xef4361(0x13a)][_0xef4361(0x143)](_0xef4361(0x1a0))),this[_0xef4361(0x18e)]=!0x0,this[_0xef4361(0x137)][_0xef4361(0x1a2)][_0xef4361(0x117)]();}[_0x4e3e1b(0x122)](_0x361e65){const _0x37f481=_0x4e3e1b;this[_0x37f481(0x10b)][_0x37f481(0x10a)](),this[_0x37f481(0x137)][_0x37f481(0x1a2)][_0x37f481(0x131)]()[_0x37f481(0x144)](_0x4354cb=>_0x4354cb[_0x37f481(0x16c)](_0x361e65['id']))[_0x37f481(0x12a)](_0x2cf29a=>this[_0x37f481(0x11f)](_0x2cf29a)),this[_0x37f481(0x18e)]=!0x1,this[_0x37f481(0x137)][_0x37f481(0x1a2)][_0x37f481(0x154)]();}async[_0x4e3e1b(0x18f)](){const _0x5efe46=_0x4e3e1b;return this[_0x5efe46(0x10b)][_0x5efe46(0x17d)][_0x5efe46(0x1a9)](()=>{const _0x5d5b56=_0x5efe46;this[_0x5d5b56(0x18e)]=!0x1,this[_0x5d5b56(0x137)][_0x5d5b56(0x1a2)][_0x5d5b56(0x154)]();});}[_0x4e3e1b(0x1a8)](_0x21ef9e,_0x4cb3c2){const _0x541660=_0x4e3e1b;this[_0x541660(0x137)][_0x541660(0x189)][_0x541660(0x1a8)](_0x21ef9e,_0x4cb3c2);}[_0x4e3e1b(0x15a)](_0x2c8d5e){const _0x2f2456=_0x4e3e1b;this[_0x2f2456(0x137)][_0x2f2456(0x189)][_0x2f2456(0x15a)](_0x2c8d5e);}[_0x4e3e1b(0x124)](_0x363c74,_0x5a36d5){const _0x259785=_0x4e3e1b;this[_0x259785(0x137)][_0x259785(0x189)][_0x259785(0x124)](_0x363c74,_0x5a36d5);}[_0x4e3e1b(0x135)](_0x522354){const _0x29df07=_0x4e3e1b;this[_0x29df07(0x137)][_0x29df07(0x189)][_0x29df07(0x135)](_0x522354);}[_0x4e3e1b(0x192)](_0x41d9ad){const _0x307859=_0x4e3e1b;this[_0x307859(0x137)][_0x307859(0x189)][_0x307859(0x192)](_0x41d9ad);}[_0x4e3e1b(0x158)](){const _0xd97a7c=_0x4e3e1b;this[_0xd97a7c(0x137)][_0xd97a7c(0x189)][_0xd97a7c(0x158)]();}[_0x4e3e1b(0x162)](){const _0x45e5f1=_0x4e3e1b;this[_0x45e5f1(0x137)][_0x45e5f1(0x189)][_0x45e5f1(0x162)]();}[_0x4e3e1b(0x18c)](_0x5238ca,_0x3e9c3b,_0x26d790){const _0x533cef=_0x4e3e1b;this[_0x533cef(0x137)][_0x533cef(0x189)][_0x533cef(0x18c)](_0x5238ca,_0x3e9c3b,_0x26d790);}[_0x4e3e1b(0x183)](){const _0x48fada=_0x4e3e1b;this[_0x48fada(0x137)][_0x48fada(0x189)][_0x48fada(0x183)](),this[_0x48fada(0x137)][_0x48fada(0x189)][_0x48fada(0x13b)](this[_0x48fada(0x166)]());}[_0x4e3e1b(0x18d)](_0x3c238c){const _0x528819=_0x4e3e1b;this[_0x528819(0x137)][_0x528819(0x189)][_0x528819(0x18d)](_0x3c238c);}[_0x4e3e1b(0x156)](_0x284803){const _0xdea1ae=_0x4e3e1b;this[_0xdea1ae(0x137)][_0xdea1ae(0x189)][_0xdea1ae(0x121)](_0x284803[_0xdea1ae(0x171)]),this[_0xdea1ae(0x137)][_0xdea1ae(0x189)][_0xdea1ae(0x13e)](_0x284803[_0xdea1ae(0x15f)]),this[_0xdea1ae(0x137)][_0xdea1ae(0x189)][_0xdea1ae(0x13b)](this[_0xdea1ae(0x166)](_0x284803));}[_0x4e3e1b(0x133)](_0x582551,_0x25071e){const _0x23433b=_0x4e3e1b;this[_0x23433b(0x137)][_0x23433b(0x189)][_0x23433b(0x179)](_0x582551),_0x25071e&&this[_0x23433b(0x137)][_0x23433b(0x189)][_0x23433b(0x142)](!0x1);}[_0x4e3e1b(0x19a)](_0x109cf0){const _0x568ddf=_0x4e3e1b;this[_0x568ddf(0x112)]=_0x109cf0;}[_0x4e3e1b(0x12f)](_0x1c8030){const _0x551f28=_0x4e3e1b;this[_0x551f28(0x137)][_0x551f28(0x1a2)][_0x551f28(0x12f)](_0x1c8030);}[_0x4e3e1b(0x11c)](){const _0x44fceb=_0x4e3e1b;this[_0x44fceb(0x109)](_0x273aee(this[_0x44fceb(0x13f)][_0x44fceb(0x123)],_0x44fceb(0x173)));}[_0x4e3e1b(0x109)](_0x24c2b2,_0x5c31c1=!0x1){const _0x11419c=_0x4e3e1b;if(_0x5c31c1&&!_0x262090()&&_0x24c2b2[_0x11419c(0x19d)])return this[_0x11419c(0x137)][_0x11419c(0x177)][_0x11419c(0x145)]='',void this[_0x11419c(0x150)](_0x24c2b2);this[_0x11419c(0x137)][_0x11419c(0x177)][_0x11419c(0x145)]=_0x24c2b2;}[_0x4e3e1b(0x163)](_0x29b029){const _0x14aaed=_0x4e3e1b,_0xab2cdf=this[_0x14aaed(0x14e)](_0x29b029);this[_0x14aaed(0x137)][_0x14aaed(0x1a2)][_0x14aaed(0x163)](_0xab2cdf);}[_0x4e3e1b(0x150)](_0x11b1e7){const _0x2ce424=_0x4e3e1b;let _0x5a5e1b=0x0;clearInterval(this[_0x2ce424(0x14f)]),this[_0x2ce424(0x14f)]=setInterval(()=>{const _0x218b90=_0x2ce424;this[_0x218b90(0x137)][_0x218b90(0x177)][_0x218b90(0x145)]=this[_0x218b90(0x137)][_0x218b90(0x177)][_0x218b90(0x145)]+_0x11b1e7[_0x5a5e1b],_0x5a5e1b++,_0x5a5e1b===_0x11b1e7[_0x218b90(0x19d)]&&clearInterval(this[_0x218b90(0x14f)]);},0x1e);}[_0x4e3e1b(0x199)](_0x4c7a7c){const _0x32d7bc=_0x4e3e1b;this[_0x32d7bc(0x137)][_0x32d7bc(0x177)][_0x32d7bc(0x152)]=_0x4c7a7c;}[_0x4e3e1b(0x14e)](_0xa7dca9){const _0x8bd827=_0x4e3e1b;return _0xa7dca9?_0xa7dca9[_0x8bd827(0x171)]&&_0xa7dca9[_0x8bd827(0x15f)]?_0x273aee(this[_0x8bd827(0x13f)][_0x8bd827(0x123)],_0x8bd827(0x14a)):_0xa7dca9[_0x8bd827(0x171)]?_0x273aee(this[_0x8bd827(0x13f)][_0x8bd827(0x123)],_0x8bd827(0x107)):_0xa7dca9[_0x8bd827(0x15f)]?_0x273aee(this[_0x8bd827(0x13f)][_0x8bd827(0x123)],_0x8bd827(0x134)):_0x273aee(this[_0x8bd827(0x13f)][_0x8bd827(0x123)],_0x8bd827(0x172)):'';}[_0x4e3e1b(0x166)](_0x5c13cb){const _0x12679a=_0x4e3e1b;return _0x5c13cb?_0x5c13cb[_0x12679a(0x171)]&&_0x5c13cb[_0x12679a(0x15f)]?_0x273aee(this[_0x12679a(0x13f)][_0x12679a(0x123)],_0x12679a(0x11a)):_0x5c13cb[_0x12679a(0x171)]?_0x273aee(this[_0x12679a(0x13f)][_0x12679a(0x123)],_0x12679a(0x108)):_0x5c13cb[_0x12679a(0x15f)]?_0x273aee(this[_0x12679a(0x13f)][_0x12679a(0x123)],_0x12679a(0x114)):_0x273aee(this[_0x12679a(0x13f)][_0x12679a(0x123)],_0x12679a(0x10f)):_0x273aee(this[_0x12679a(0x13f)][_0x12679a(0x123)],_0x12679a(0x10f));}[_0x4e3e1b(0x128)](_0x309970,_0x568191,_0x126a74,_0x51e21e){const _0x286f27=_0x4e3e1b;this[_0x286f27(0x137)][_0x286f27(0x128)](_0x309970,_0x568191,_0x126a74,_0x51e21e);}[_0x4e3e1b(0x170)](_0x22dfaf){const _0x366f95=_0x4e3e1b;this[_0x366f95(0x137)][_0x366f95(0x170)](_0x22dfaf);}[_0x4e3e1b(0x106)](){const _0x88f428=_0x4e3e1b;this[_0x88f428(0x137)][_0x88f428(0x189)][_0x88f428(0x106)]();}[_0x4e3e1b(0x181)](_0x37a626,_0x2a32de){const _0x3e0171=_0x4e3e1b;this[_0x3e0171(0x137)][_0x3e0171(0x1a2)][_0x3e0171(0x17a)](_0x37a626,_0x2a32de);}[_0x4e3e1b(0x117)](){const _0x13165=_0x4e3e1b;this[_0x13165(0x137)][_0x13165(0x1a2)][_0x13165(0x117)]();}[_0x4e3e1b(0x17c)](){const _0x2c87d2=_0x4e3e1b;this[_0x2c87d2(0x137)][_0x2c87d2(0x189)][_0x2c87d2(0x140)]=!0x0;}[_0x4e3e1b(0x16d)](){const _0x3b6677=_0x4e3e1b;this[_0x3b6677(0x137)][_0x3b6677(0x189)][_0x3b6677(0x140)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xfc34d3=_0x4647;(function(_0x27f06f,_0x487c1c){const _0x443465=_0x4647,_0x53b66b=_0x27f06f();while(!![]){try{const _0xfdb75c=-parseInt(_0x443465(0xf0))/0x1+parseInt(_0x443465(0xb5))/0x2*(parseInt(_0x443465(0xde))/0x3)+parseInt(_0x443465(0xc9))/0x4*(parseInt(_0x443465(0x69))/0x5)+parseInt(_0x443465(0x9d))/0x6+parseInt(_0x443465(0x6f))/0x7+parseInt(_0x443465(0x71))/0x8+-parseInt(_0x443465(0xdd))/0x9;if(_0xfdb75c===_0x487c1c)break;else _0x53b66b['push'](_0x53b66b['shift']());}catch(_0x537854){_0x53b66b['push'](_0x53b66b['shift']());}}}(_0x1a1a,0xf32da));import{CKEditorError as _0xef393d,ObservableMixin as _0x3555f4,uid as _0x37f04c}from'ckeditor5/src/utils.js';function _0x4647(_0x5d0c54,_0x12ad98){const _0x1a1a9b=_0x1a1a();return _0x4647=function(_0x464708,_0x5a656a){_0x464708=_0x464708-0x65;let _0x4daf4b=_0x1a1a9b[_0x464708];return _0x4daf4b;},_0x4647(_0x5d0c54,_0x12ad98);}import{AIContextItemType as _0x28b210,AIContextTextResourceType as _0x8c66f6}from'../../aicore/model/aicontext.js';import{escape as _0x34a956}from'es-toolkit/compat';import{errorsMap as _0x187db4}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xfc34d3(0xea),_0xfc34d3(0x6d),_0xfc34d3(0xb4),_0xfc34d3(0xd3),_0xfc34d3(0xed),_0xfc34d3(0xbb),_0xfc34d3(0xe5),_0xfc34d3(0x70),_0xfc34d3(0x86)];function _0x1a1a(){const _0x22d3de=['version','delete','string','clearPendingContextItems','enabled','FILE','_createContextItemFromContent','_connector','URL','init','_finishUploadOperation','_isResourceInContext','message','end','current-document','277716oIJPjx','uploadDocument','urls','removeFromContext','_getCustomSourcesInitialState','values','isHidden','ai-chat-document-upload-failed','_conversationContextItems','abort','SELECTION','get','populateFromMessage','ai-chat-source-resources-load-failed','ai-chat-context-unsupported-type','DOCUMENT','document','url','getSentContextItems','_removeContextItem','_convertTextResourceToFile','_pendingContextItems','start','contextItemLoadingEnded','4QwaLiI','ai-chat-source-not-found','content','label','ai-chat-resource-load-failed','_addToConversationContextItem','addContextOptionsChanged','addResourceToContext','ai-chat-resource-no-data','ai-request-aborted','push','uiId','_ongoingUploadOperations','ai-chat-url-upload-failed','TEXT','File','text/markdown','getId','text/plain','abortController','5188ftIWqf','name','isCurrentDocumentInContext','_addContextItem','object\x20with\x20content\x20and\x20type\x20properties','code','fire','_addContextOptionsState','sources','_startUploadOperation','contextSent','_finishContextItemLoading','hidden','all','_config','files-','ai-chat-file-upload-failed','isSelectionInContext','addToConversationContext','getResources','6778080lPRVSJ','1584309rwpAuY','_ownerId','length','files','mapContextItemsToRequestData','stack','ai-chat-context-invalid-data','sourceResourcesLoaded','url-','_findSourceIdsByResourceId','addSelectionToContext','resources','contextItemAdded','size','getData','error','Current\x20document','addUrlToContext','1598626RWwQwL','addCurrentDocumentToContext','_mapContextItemToRequestData','sessionId','getDocument','updateCurrentDocument','isCurrentDocumentInConversation','1995qGDJDs','uploadFile','uploadUrl','filter','contextItemRemoved','getPendingContextItems','4852330FiVDYZ','resourceStateChanged','8276952yNcFmG','text/html','removeSelectionFromContext','HTML','MARKDOWN','isReadOnly','set','has','addFilesToContext','attributes','file-','resourceId','from','find','loadSourceResources','_updateResourceInContextState','map','type','selection','object','_ongoingUploads','uploadProgressChanged','fetchDocument','_toggleAddCurrentDocumentOptionVisibility','startsWith','_setAddContextOptionsDefaultState','data','isInContext','forEach'];_0x1a1a=function(){return _0x22d3de;};return _0x1a1a();}export class AIChatContext extends _0x3555f4(){[_0xfc34d3(0x95)];[_0xfc34d3(0xd7)];[_0xfc34d3(0xdf)];constructor({connector:_0x8bf444,config:_0x25f9ab,ownerId:_0x3c8784}){const _0x409335=_0xfc34d3;super(),this[_0x409335(0x95)]=_0x8bf444,this[_0x409335(0xd7)]=_0x25f9ab,this[_0x409335(0xdf)]=_0x3c8784;}[_0xfc34d3(0x97)](){const _0x4408ef=_0xfc34d3;this[_0x4408ef(0xb2)]=new Map(),this[_0x4408ef(0xa5)]=new Map(),this[_0x4408ef(0x85)]=new Map(),this[_0x4408ef(0xc1)]=new Map(),this[_0x4408ef(0x8a)]();}[_0xfc34d3(0x6e)](){const _0x693fd9=_0xfc34d3;return this[_0x693fd9(0xb2)];}async[_0xfc34d3(0xa9)](_0x546671){const _0x5c47ce=_0xfc34d3,_0x3d1063=await this[_0x5c47ce(0x94)](_0x546671);return this[_0x5c47ce(0xba)](_0x3d1063),_0x5c47ce(0x9c)===_0x3d1063[_0x5c47ce(0xc0)]&&this[_0x5c47ce(0x88)](),_0x3d1063;}async[_0xfc34d3(0x94)](_0x22a74f){const _0x5f2c66=_0xfc34d3;if(_0x22a74f[_0x5f2c66(0x82)]===_0x28b210[_0x5f2c66(0xac)]){const _0x3737c8=await this[_0x5f2c66(0x95)][_0x5f2c66(0x87)](this[_0x5f2c66(0xdf)],_0x22a74f['id'])[_0x5f2c66(0x66)]();return{'id':_0x5f2c66(0x9c),'uiId':_0x5f2c66(0x9c),'label':_0x5f2c66(0xee),'type':_0x22a74f[_0x5f2c66(0x82)],'content':_0x3737c8[_0x5f2c66(0xb7)],'hidden':this[_0x5f2c66(0xa5)][_0x5f2c66(0x78)](_0x5f2c66(0x9c)),'version':_0x3737c8[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x8e)],'sessionId':_0x3737c8[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x65)]};}return{'id':_0x22a74f['id'],'uiId':_0x22a74f['id'],'label':_0x22a74f[_0x5f2c66(0x7a)]?.[_0x5f2c66(0xb8)]||_0x22a74f[_0x5f2c66(0xca)]||_0x22a74f[_0x5f2c66(0xae)]||_0x22a74f['id'],'type':_0x22a74f[_0x5f2c66(0x82)],..._0x22a74f?.[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x7c)]?{'resourceId':_0x22a74f[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x7c)]}:{}};}[_0xfc34d3(0xaf)](){const _0x3a790c=_0xfc34d3;return new Map(this[_0x3a790c(0xa5)]);}[_0xfc34d3(0xa0)](_0x58be4f){const _0x2109c6=_0xfc34d3,_0x2f3e7b=this[_0x2109c6(0xb2)][_0x2109c6(0xa8)](_0x58be4f);_0x2f3e7b?.[_0x2109c6(0x76)]||this[_0x2109c6(0xb0)](_0x58be4f);}[_0xfc34d3(0x91)](){const _0x4ffb56=_0xfc34d3;if(0x0===this[_0x4ffb56(0xb2)][_0x4ffb56(0xeb)])return;for(const _0x5bd1b0 of this[_0x4ffb56(0xb2)][_0x4ffb56(0xa2)]())this[_0x4ffb56(0xb0)](_0x5bd1b0[_0x4ffb56(0xc0)]);const _0x2ed4af=this[_0x4ffb56(0xa5)][_0x4ffb56(0xa8)](_0x4ffb56(0x9c))||this[_0x4ffb56(0xb2)][_0x4ffb56(0xa8)](_0x4ffb56(0x9c));_0x2ed4af&&this[_0x4ffb56(0xcc)]({..._0x2ed4af,'isReadOnly':!0x0,'hidden':!0x0});}[_0xfc34d3(0xdb)](_0x5c9b50){const _0xbf9981=_0xfc34d3;for(const _0x4be6ba of _0x5c9b50[_0xbf9981(0xa2)]())this[_0xbf9981(0xba)](_0x4be6ba);this[_0xbf9981(0x91)](),this[_0xbf9981(0xcf)](_0xbf9981(0xd3),{'contextItems':Array[_0xbf9981(0x7d)](this[_0xbf9981(0xaf)]()[_0xbf9981(0xa2)]())});}[_0xfc34d3(0xcb)](){const _0x1d4608=_0xfc34d3;return this[_0x1d4608(0xb2)][_0x1d4608(0x78)](_0x1d4608(0x9c));}[_0xfc34d3(0xda)](){const _0x2bb13d=_0xfc34d3;return this[_0x2bb13d(0xb2)][_0x2bb13d(0x78)](_0x2bb13d(0x83));}[_0xfc34d3(0x68)](){const _0x231c5c=_0xfc34d3;return this[_0x231c5c(0xa5)][_0x231c5c(0x78)](_0x231c5c(0x9c));}static[_0xfc34d3(0xe2)](_0x792a44){const _0x4b4ffd=_0xfc34d3;return Array[_0x4b4ffd(0x7d)](_0x792a44[_0x4b4ffd(0xa2)]())[_0x4b4ffd(0x81)](_0x487d72=>this[_0x4b4ffd(0xf2)](_0x487d72))[_0x4b4ffd(0x6c)](_0x59411a=>null!==_0x59411a);}async[_0xfc34d3(0x79)](_0x1e2b1d,_0xb81786,_0x217af7=_0x28b210[_0xfc34d3(0x93)]){const _0x486300=_0xfc34d3,_0x5af839=_0x486300(0xd8)+_0x37f04c();this[_0x486300(0xd2)](_0x5af839);try{await Promise[_0x486300(0xd6)](_0x1e2b1d[_0x486300(0x81)](async _0x420c82=>{const _0x166d57=_0x486300,_0x4de900=_0x166d57(0x7b)+_0x37f04c(),_0x38e015=_0x34a956(_0x420c82[_0x166d57(0xca)]);try{this[_0x166d57(0xcc)]({'type':_0x217af7,'label':_0xb81786?.[_0x166d57(0xb8)]||_0x38e015,'uiId':_0x4de900,'resourceId':_0xb81786?.[_0x166d57(0x7c)]},!0x0);const _0x5228b2=this[_0x166d57(0x95)][_0x166d57(0x6a)](this[_0x166d57(0xdf)],_0x420c82,_0xb81786);this[_0x166d57(0x85)][_0x166d57(0x77)](_0x4de900,_0x5228b2[_0x166d57(0xc8)]);const {id:_0x40794e}=await _0x5228b2[_0x166d57(0xc6)]();this[_0x166d57(0x85)][_0x166d57(0x8f)](_0x4de900),this[_0x166d57(0xd4)]({'type':_0x217af7,'id':_0x40794e,'label':_0xb81786?.[_0x166d57(0xb8)]||_0x38e015,'uiId':_0x4de900,'resourceId':_0xb81786?.[_0x166d57(0x7c)]},!0x1);}catch(_0xb486c3){this[_0x166d57(0x85)][_0x166d57(0x8f)](_0x4de900);if(!(_0xb486c3 instanceof _0xef393d&&_0xb486c3[_0x166d57(0x9a)][_0x166d57(0x89)](_0x166d57(0xbe)))){const _0x1be6df=_0x187db4[_0x166d57(0xa8)](_0xb486c3[_0x166d57(0xce)])||_0x166d57(0xd9),_0x3797d6=new _0xef393d(_0x1be6df,null,{'fileName':_0x38e015,..._0xb486c3});_0x3797d6[_0x166d57(0xe3)]=_0xb486c3[_0x166d57(0xe3)],this[_0x166d57(0xcf)](_0x166d57(0xed),{'error':_0x3797d6});}this[_0x166d57(0xb0)](_0x4de900);}}));}finally{this[_0x486300(0x98)](_0x5af839);}}[_0xfc34d3(0xf1)](_0xd61738){const _0xce36db=_0xfc34d3;if(this[_0xce36db(0xcb)]())return;const _0x1433f7={'type':_0x28b210[_0xce36db(0xac)],'uiId':_0xce36db(0x9c),'label':_0xd61738,'isReadOnly':this[_0xce36db(0xa5)][_0xce36db(0x78)](_0xce36db(0x9c)),'hidden':this[_0xce36db(0xa5)][_0xce36db(0x78)](_0xce36db(0x9c))};this[_0xce36db(0xcc)](_0x1433f7);}async[_0xfc34d3(0x67)](_0x5dd444,_0x5ce53e,_0x160b18,_0x6c6077){const _0x46354a=_0xfc34d3,_0x5346a8=this[_0x46354a(0xb2)][_0x46354a(0xa8)](_0x46354a(0x9c));if(_0x5346a8&&_0x5dd444){_0x5346a8[_0x46354a(0x83)]=_0x6c6077?_0x6c6077[_0x46354a(0x81)](_0x36da61=>({'start':_0x36da61[_0x46354a(0xb3)],'end':_0x36da61[_0x46354a(0x9b)]})):[];try{if(_0x5346a8[_0x46354a(0x8e)]===_0x5ce53e)return;const {id:_0x2b4459}=await this[_0x46354a(0x95)][_0x46354a(0x9e)](this[_0x46354a(0xdf)],_0x5dd444,{'version':_0x5ce53e,'sessionId':_0x160b18})[_0x46354a(0xc6)]();_0x5346a8['id']=_0x2b4459,_0x5346a8[_0x46354a(0xb7)]=_0x5dd444,_0x5346a8[_0x46354a(0x8e)]=_0x5ce53e,_0x5346a8[_0x46354a(0x65)]=_0x160b18;}catch(_0x34c69a){const _0x9fc1d1=new _0xef393d(_0x46354a(0xa4),null);_0x9fc1d1[_0x46354a(0xe3)]=_0x34c69a[_0x46354a(0xe3)],this[_0x46354a(0xcf)](_0x46354a(0xed),{'error':_0x9fc1d1});}}}[_0xfc34d3(0xe8)](_0x1725d8){const _0x49fc42=_0xfc34d3;this[_0x49fc42(0xcc)]({'type':_0x28b210[_0x49fc42(0xa7)],'label':_0x1725d8,'uiId':_0x49fc42(0x83),'content':_0x1725d8});}[_0xfc34d3(0x73)](){const _0x2ec8c1=_0xfc34d3;this[_0x2ec8c1(0xb0)](_0x2ec8c1(0x83));}async[_0xfc34d3(0xef)](_0x3304e7,_0x3709f4){const _0x36541d=_0xfc34d3,_0x1154b4=_0x36541d(0xe6)+_0x37f04c();this[_0x36541d(0xd2)](_0x1154b4);const _0xc25206=_0x36541d(0xe6)+_0x37f04c();try{this[_0x36541d(0xcc)]({'type':_0x28b210[_0x36541d(0x96)],'label':_0x3709f4?.[_0x36541d(0xb8)]||_0x3304e7,'uiId':_0xc25206,'resourceId':_0x3709f4?.[_0x36541d(0x7c)]},!0x0);const _0x1f1227=this[_0x36541d(0x95)][_0x36541d(0x6b)](this[_0x36541d(0xdf)],_0x3304e7,_0x3709f4);this[_0x36541d(0x85)][_0x36541d(0x77)](_0xc25206,_0x1f1227[_0x36541d(0xc8)]);const {id:_0x3c217e}=await _0x1f1227[_0x36541d(0xc6)]();this[_0x36541d(0x85)][_0x36541d(0x8f)](_0xc25206),this[_0x36541d(0xd4)]({'type':_0x28b210[_0x36541d(0x96)],'id':_0x3c217e,'label':_0x3709f4?.[_0x36541d(0xb8)]||_0x3304e7,'uiId':_0xc25206,'resourceId':_0x3709f4?.[_0x36541d(0x7c)]},!0x1);}catch(_0x3d1dbf){this[_0x36541d(0x85)][_0x36541d(0x8f)](_0xc25206),(_0x3d1dbf[_0x36541d(0x9a)][_0x36541d(0x89)](_0x36541d(0xbe))||this[_0x36541d(0xcf)](_0x36541d(0xed),{'error':new _0xef393d(_0x36541d(0xc2),this,{'url':_0x3304e7,'originalError':_0x3d1dbf}),'url':_0x3304e7}),this[_0x36541d(0xb0)](_0xc25206));}finally{this[_0x36541d(0x98)](_0x1154b4);}}async[_0xfc34d3(0x7f)](_0x48ccd0,_0x1de832,_0x3dac8a){const _0x3f9bb1=_0xfc34d3,_0x736164=this[_0x3f9bb1(0xd0)][_0x3f9bb1(0xd1)][_0x3f9bb1(0x7e)](_0x4ef5c3=>_0x4ef5c3['id']===_0x48ccd0);if(!_0x736164)return this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xed),{'error':new _0xef393d(_0x3f9bb1(0xb6),this,{'sourceId':_0x48ccd0}),'sourceId':_0x48ccd0}),[];try{const _0x5d865b=(await _0x736164[_0x3f9bb1(0xdc)](_0x1de832))[_0x3f9bb1(0x81)](_0x458f8f=>{const _0x2c1570=_0x3f9bb1,_0x4c491b=this[_0x2c1570(0x99)](_0x458f8f['id']);return{..._0x458f8f,'isInContext':_0x4c491b};});return _0x736164[_0x3f9bb1(0xe9)]=_0x5d865b,this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xe5),{'sourceId':_0x48ccd0,'source':_0x736164,'resources':_0x5d865b,'uid':_0x3dac8a}),_0x5d865b;}catch(_0x738c75){return this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xed),{'error':new _0xef393d(_0x3f9bb1(0xaa),this,{'sourceId':_0x48ccd0,'originalError':_0x738c75}),'sourceId':_0x48ccd0,'sourceLabel':_0x736164[_0x3f9bb1(0xb8)]}),[];}}async[_0xfc34d3(0xbc)](_0x5bebce,_0x279d63){const _0x14a9c6=_0xfc34d3;if(this[_0x14a9c6(0x99)](_0x279d63['id']))return;let _0x1fe7db=_0x279d63[_0x14a9c6(0x8b)];if(!_0x1fe7db&&_0x5bebce[_0x14a9c6(0xec)])try{_0x1fe7db=await _0x5bebce[_0x14a9c6(0xec)](_0x279d63['id']);}catch(_0x3afa41){return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xb9),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'originalError':_0x3afa41}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}if(_0x1fe7db)switch(_0x279d63[_0x14a9c6(0x82)]){case _0x28b210[_0x14a9c6(0x96)]:if(_0x14a9c6(0x90)!=typeof _0x1fe7db)return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0x90),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});await this[_0x14a9c6(0xef)](_0x1fe7db,{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']});break;case _0x28b210[_0x14a9c6(0x93)]:if(!(_0x1fe7db instanceof File))return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0xc4),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});await this[_0x14a9c6(0x79)]([_0x1fe7db],{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']});break;case _0x28b210[_0x14a9c6(0xc3)]:if(_0x14a9c6(0x84)!=typeof _0x1fe7db||!(_0x14a9c6(0xb7)in _0x1fe7db)||!(_0x14a9c6(0x82)in _0x1fe7db))return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0xcd),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});_0x1fe7db=AIChatContext[_0x14a9c6(0xb1)](_0x1fe7db,_0x279d63[_0x14a9c6(0xb8)]),await this[_0x14a9c6(0x79)]([_0x1fe7db],{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']},_0x28b210[_0x14a9c6(0xc3)]);break;default:this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xab),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'resourceType':_0x279d63[_0x14a9c6(0x82)]}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}else this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xbd),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}static[_0xfc34d3(0xb1)](_0xe57dfb,_0x1c4160){const _0x5f1fb7=_0xfc34d3;switch(_0xe57dfb[_0x5f1fb7(0x82)]){case _0x8c66f6[_0x5f1fb7(0x75)]:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0xc5)});case _0x8c66f6[_0x5f1fb7(0x74)]:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0x72)});default:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0xc7)});}}static[_0xfc34d3(0xf2)](_0x586b12){const _0x54ec2e=_0xfc34d3;switch(_0x586b12[_0x54ec2e(0x82)]){case _0x28b210[_0x54ec2e(0x93)]:return{'type':_0x28b210[_0x54ec2e(0x93)],'id':_0x586b12['id']};case _0x28b210[_0x54ec2e(0x96)]:return{'type':_0x28b210[_0x54ec2e(0x96)],'id':_0x586b12['id']};case _0x28b210[_0x54ec2e(0xac)]:return{'type':_0x28b210[_0x54ec2e(0xac)],'id':_0x586b12['id'],..._0x586b12[_0x54ec2e(0x83)]?.[_0x54ec2e(0xe0)]&&{'selection':_0x586b12[_0x54ec2e(0x83)]}};case _0x28b210[_0x54ec2e(0xc3)]:return{'type':_0x28b210[_0x54ec2e(0x93)],'id':_0x586b12['id']};default:return null;}}[_0xfc34d3(0xcc)](_0x312b6f,_0xc0d646=!0x1){const _0x764e3=_0xfc34d3;if(this[_0x764e3(0xb2)][_0x764e3(0x77)](_0x312b6f[_0x764e3(0xc0)],_0x312b6f),_0x312b6f[_0x764e3(0xd5)]||this[_0x764e3(0xcf)](_0x764e3(0xea),{'contextItem':_0x312b6f,'isLoading':_0xc0d646}),_0x764e3(0x9c)===_0x312b6f[_0x764e3(0xc0)]&&this[_0x764e3(0x88)](),_0x312b6f[_0x764e3(0x7c)]){const _0x2ba9d3=this[_0x764e3(0xe7)](_0x312b6f[_0x764e3(0x7c)]);_0x2ba9d3&&_0x2ba9d3[_0x764e3(0x8d)](_0x76d7dc=>{const _0x2b9eb3=_0x764e3;this[_0x2b9eb3(0x80)](_0x76d7dc,_0x312b6f[_0x2b9eb3(0x7c)],!0x0);});}}[_0xfc34d3(0xb0)](_0x105c7e){const _0x4e8fa4=_0xfc34d3,_0x1235a7=this[_0x4e8fa4(0xb2)][_0x4e8fa4(0xa8)](_0x105c7e),_0x373b21=this[_0x4e8fa4(0x85)][_0x4e8fa4(0xa8)](_0x105c7e);if(_0x373b21&&(_0x373b21[_0x4e8fa4(0xa6)](),this[_0x4e8fa4(0x85)][_0x4e8fa4(0x8f)](_0x105c7e)),_0x1235a7?.[_0x4e8fa4(0x7c)]){const _0x592b0f=this[_0x4e8fa4(0xe7)](_0x1235a7[_0x4e8fa4(0x7c)]);_0x592b0f&&_0x592b0f[_0x4e8fa4(0x8d)](_0x1b417b=>{const _0x1fbd0f=_0x4e8fa4;this[_0x1fbd0f(0x80)](_0x1b417b,_0x1235a7[_0x1fbd0f(0x7c)],!0x1);});}this[_0x4e8fa4(0xb2)][_0x4e8fa4(0x8f)](_0x105c7e),this[_0x4e8fa4(0xcf)](_0x4e8fa4(0x6d),{'uiId':_0x105c7e,'type':_0x1235a7?.[_0x4e8fa4(0x82)]}),_0x4e8fa4(0x9c)===_0x105c7e&&this[_0x4e8fa4(0x88)]();}[_0xfc34d3(0xd4)](_0x4cb770,_0xaaa9cc){const _0x48f07e=_0xfc34d3;if(this[_0x48f07e(0xb2)][_0x48f07e(0x78)](_0x4cb770[_0x48f07e(0xc0)])&&(this[_0x48f07e(0xb2)][_0x48f07e(0x77)](_0x4cb770[_0x48f07e(0xc0)],_0x4cb770),this[_0x48f07e(0xcf)](_0x48f07e(0xb4),{'contextItem':_0x4cb770,'isLoading':_0xaaa9cc}),_0x4cb770[_0x48f07e(0x7c)])){const _0x5074c7=this[_0x48f07e(0xe7)](_0x4cb770[_0x48f07e(0x7c)]);_0x5074c7&&_0x5074c7[_0x48f07e(0x8d)](_0x1ed1d1=>{const _0x4005be=_0x48f07e;this[_0x4005be(0x80)](_0x1ed1d1,_0x4cb770[_0x4005be(0x7c)],!0x0);});}}[_0xfc34d3(0xba)](_0x5a6182){const _0x56f6af=_0xfc34d3;this[_0x56f6af(0xa5)][_0x56f6af(0x77)](_0x5a6182[_0x56f6af(0xc0)],_0x5a6182);}[_0xfc34d3(0x8a)](){const _0x597c89=_0xfc34d3;this[_0x597c89(0xd0)]={'document':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0xad)]?.[_0x597c89(0x92)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0x9f)]?.[_0x597c89(0x92)]},'files':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0xe1)]?.[_0x597c89(0x92)]},'sources':this[_0x597c89(0xa1)]()},this[_0x597c89(0xcf)](_0x597c89(0xbb),{'options':this[_0x597c89(0xd0)]});}[_0xfc34d3(0xa1)](){const _0x1c7044=_0xfc34d3;return this[_0x1c7044(0xd7)]?.[_0x1c7044(0xd1)]?.[_0x1c7044(0x81)](_0x1d7532=>({..._0x1d7532,'resources':[]}))??[];}[_0xfc34d3(0x88)](){const _0x1a7b0c=_0xfc34d3,_0x50d055=this[_0x1a7b0c(0xcb)]()||this[_0x1a7b0c(0x68)]();this[_0x1a7b0c(0xd0)][_0x1a7b0c(0xad)][_0x1a7b0c(0xa3)]=_0x50d055,this[_0x1a7b0c(0xcf)](_0x1a7b0c(0xbb),{'options':this[_0x1a7b0c(0xd0)]});}[_0xfc34d3(0x99)](_0x19876b){const _0x572b03=_0xfc34d3;for(const _0x520ebe of this[_0x572b03(0xb2)][_0x572b03(0xa2)]())if(_0x520ebe[_0x572b03(0x7c)]===_0x19876b)return!0x0;for(const _0x112381 of this[_0x572b03(0xa5)][_0x572b03(0xa2)]())if(_0x112381[_0x572b03(0x7c)]===_0x19876b)return!0x0;return!0x1;}[_0xfc34d3(0xe7)](_0xc04bf0){const _0x346fc5=_0xfc34d3,_0x39c511=[];for(const _0x5b9e8d of this[_0x346fc5(0xd0)][_0x346fc5(0xd1)]){_0x5b9e8d[_0x346fc5(0xe9)][_0x346fc5(0x7e)](_0x482af6=>_0x482af6['id']===_0xc04bf0)&&_0x39c511[_0x346fc5(0xbf)](_0x5b9e8d['id']);}return 0x0===_0x39c511[_0x346fc5(0xe0)]?null:_0x39c511;}[_0xfc34d3(0x80)](_0x4a1159,_0x1ebbc3,_0x57850b){const _0x461fbc=_0xfc34d3,_0x471c41=this[_0x461fbc(0xd0)][_0x461fbc(0xd1)][_0x461fbc(0x7e)](_0x5f34cf=>_0x5f34cf['id']===_0x4a1159);if(!_0x471c41)return;const _0x56c35d=_0x471c41[_0x461fbc(0xe9)][_0x461fbc(0x7e)](_0x897d4e=>_0x897d4e['id']===_0x1ebbc3);_0x56c35d&&(_0x56c35d[_0x461fbc(0x8c)]=_0x57850b,this[_0x461fbc(0xcf)](_0x461fbc(0x70),{'sourceId':_0x4a1159,'resourceId':_0x1ebbc3,'isInContext':_0x57850b}));}[_0xfc34d3(0xd2)](_0x2ec922){const _0x3f72aa=_0xfc34d3;this[_0x3f72aa(0xc1)][_0x3f72aa(0x77)](_0x2ec922,!0x0),this[_0x3f72aa(0xc1)][_0x3f72aa(0xeb)]&&this[_0x3f72aa(0xcf)](_0x3f72aa(0x86),{'isUploadInProgress':!0x0});}[_0xfc34d3(0x98)](_0x280603){const _0x47db40=_0xfc34d3;this[_0x47db40(0xc1)][_0x47db40(0x8f)](_0x280603),0x0===this[_0x47db40(0xc1)][_0x47db40(0xeb)]&&this[_0x47db40(0xcf)](_0x47db40(0x86),{'isUploadInProgress':!0x1});}}
23
+ const _0x59bc08=_0x177f;(function(_0x12550a,_0x5a3f07){const _0x5bdbc4=_0x177f,_0x21c794=_0x12550a();while(!![]){try{const _0x5f5187=parseInt(_0x5bdbc4(0x1f2))/0x1*(-parseInt(_0x5bdbc4(0x22c))/0x2)+-parseInt(_0x5bdbc4(0x201))/0x3+parseInt(_0x5bdbc4(0x230))/0x4*(-parseInt(_0x5bdbc4(0x1ca))/0x5)+parseInt(_0x5bdbc4(0x219))/0x6+-parseInt(_0x5bdbc4(0x1fe))/0x7*(parseInt(_0x5bdbc4(0x1b4))/0x8)+parseInt(_0x5bdbc4(0x232))/0x9+parseInt(_0x5bdbc4(0x220))/0xa*(parseInt(_0x5bdbc4(0x231))/0xb);if(_0x5f5187===_0x5a3f07)break;else _0x21c794['push'](_0x21c794['shift']());}catch(_0x20fda5){_0x21c794['push'](_0x21c794['shift']());}}}(_0x1c15,0x57bef));import{CKEditorError as _0x5ebcea,ObservableMixin as _0x29ad64,uid as _0xe945a3}from'ckeditor5/src/utils.js';import{AIContextItemType as _0xd267e,AIContextTextResourceType as _0x3f6228}from'../../aicore/model/aicontext.js';function _0x1c15(){const _0x5581b7=['1341170JneyRM','MARKDOWN','object','File','DOCUMENT','_toggleAddCurrentDocumentOptionVisibility','text/html','getPendingContextItems','_ongoingUploads','URL','ai-chat-resource-no-data','ai-chat-resource-load-failed','158vwBeEw','_ongoingUploadOperations','uploadUrl','loadSourceResources','4XKCrXW','121bzPwny','891405FUyVWm','ai-chat-file-upload-failed','enabled','sessionId','set','abortController','isInContext','delete','current-document','isHidden','start','addContextOptionsChanged','resourceId','type','addToConversationContext','uploadFile','TEXT','_conversationContextItems','168tDiKgv','getData','updateCurrentDocument','_removeContextItem','_finishUploadOperation','hidden','addUrlToContext','getSentContextItems','sources','map','ai-request-aborted','addResourceToContext','data','_pendingContextItems','message','isSelectionInContext','removeFromContext','all','FILE','getId','stack','sourceResourcesLoaded','3337645UEWRWi','end','_updateResourceInContextState','ai-chat-source-not-found','length','error','_getCustomSourcesInitialState','has','addFilesToContext','_convertTextResourceToFile','contextItemLoadingEnded','file-','ai-chat-url-upload-failed','urls','_finishContextItemLoading','text/markdown','clearPendingContextItems','contextItemAdded','ai-chat-context-unsupported-type','fetchDocument','isCurrentDocumentInContext','getDocument','_ownerId','uploadDocument','string','values','size','_connector','resources','object\x20with\x20content\x20and\x20type\x20properties','_addToConversationContextItem','contextSent','_mapContextItemToRequestData','text/plain','ai-chat-source-resources-load-failed','uiId','resourceStateChanged','content','files-','ai-chat-context-invalid-data','3959vqwEZL','_findSourceIdsByResourceId','init','isCurrentDocumentInConversation','ai-chat-document-upload-failed','isReadOnly','url','push','version','_addContextOptionsState','uploadProgressChanged','addCurrentDocumentToContext','181895CzefYm','name','attributes','869400utkwwy','getResources','document','Current\x20document','label','code','_isResourceInContext','mapContextItemsToRequestData','contextItemRemoved','files','get','HTML','startsWith','_addContextItem','_config','addSelectionToContext','from','selection','abort','SELECTION','_setAddContextOptionsDefaultState','_startUploadOperation','populateFromMessage','removeSelectionFromContext','3605100PHhhDh','filter','url-','_createContextItemFromContent','fire','find','forEach'];_0x1c15=function(){return _0x5581b7;};return _0x1c15();}import{escape as _0x1d2d32}from'es-toolkit/compat';import{errorsMap as _0x54bba8}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x59bc08(0x1db),_0x59bc08(0x209),_0x59bc08(0x1d4),_0x59bc08(0x1e9),_0x59bc08(0x1cf),_0x59bc08(0x23d),_0x59bc08(0x1c9),_0x59bc08(0x1ee),_0x59bc08(0x1fc)];function _0x177f(_0x2f6272,_0x216c4d){const _0x1c157b=_0x1c15();return _0x177f=function(_0x177f0f,_0x915992){_0x177f0f=_0x177f0f-0x1af;let _0x51e6b3=_0x1c157b[_0x177f0f];return _0x51e6b3;},_0x177f(_0x2f6272,_0x216c4d);}export class AIChatContext extends _0x29ad64(){[_0x59bc08(0x1e5)];[_0x59bc08(0x20f)];[_0x59bc08(0x1e0)];constructor({connector:_0x2fec8a,config:_0x53a5b5,ownerId:_0x48331f}){const _0x344e2a=_0x59bc08;super(),this[_0x344e2a(0x1e5)]=_0x2fec8a,this[_0x344e2a(0x20f)]=_0x53a5b5,this[_0x344e2a(0x1e0)]=_0x48331f;}[_0x59bc08(0x1f4)](){const _0x497786=_0x59bc08;this[_0x497786(0x1c1)]=new Map(),this[_0x497786(0x1b3)]=new Map(),this[_0x497786(0x228)]=new Map(),this[_0x497786(0x22d)]=new Map(),this[_0x497786(0x215)]();}[_0x59bc08(0x227)](){const _0x8b2d81=_0x59bc08;return this[_0x8b2d81(0x1c1)];}async[_0x59bc08(0x217)](_0x456819){const _0x40b04b=_0x59bc08,_0x19f2ba=await this[_0x40b04b(0x21c)](_0x456819);return this[_0x40b04b(0x1e8)](_0x19f2ba),_0x40b04b(0x23a)===_0x19f2ba[_0x40b04b(0x1ed)]&&this[_0x40b04b(0x225)](),_0x19f2ba;}async[_0x59bc08(0x21c)](_0x8a19c4){const _0x3a3d31=_0x59bc08;if(_0x8a19c4[_0x3a3d31(0x1af)]===_0xd267e[_0x3a3d31(0x224)]){const _0x394d7a=await this[_0x3a3d31(0x1e5)][_0x3a3d31(0x1dd)](this[_0x3a3d31(0x1e0)],_0x8a19c4['id'])[_0x3a3d31(0x1df)]();return{'id':_0x3a3d31(0x23a),'uiId':_0x3a3d31(0x23a),'label':_0x3a3d31(0x204),'type':_0x8a19c4[_0x3a3d31(0x1af)],'content':_0x394d7a[_0x3a3d31(0x1ef)],'hidden':this[_0x3a3d31(0x1b3)][_0x3a3d31(0x1d1)](_0x3a3d31(0x23a)),'version':_0x394d7a[_0x3a3d31(0x200)]?.[_0x3a3d31(0x1fa)],'sessionId':_0x394d7a[_0x3a3d31(0x200)]?.[_0x3a3d31(0x235)]};}return{'id':_0x8a19c4['id'],'uiId':_0x8a19c4['id'],'label':_0x8a19c4[_0x3a3d31(0x200)]?.[_0x3a3d31(0x205)]||_0x8a19c4[_0x3a3d31(0x1ff)]||_0x8a19c4[_0x3a3d31(0x1f8)]||_0x8a19c4['id'],'type':_0x8a19c4[_0x3a3d31(0x1af)],..._0x8a19c4?.[_0x3a3d31(0x200)]?.[_0x3a3d31(0x23e)]?{'resourceId':_0x8a19c4[_0x3a3d31(0x200)]?.[_0x3a3d31(0x23e)]}:{}};}[_0x59bc08(0x1bb)](){const _0x3a4d9d=_0x59bc08;return new Map(this[_0x3a4d9d(0x1b3)]);}[_0x59bc08(0x1c4)](_0x542e75){const _0x134f43=_0x59bc08,_0x5efb79=this[_0x134f43(0x1c1)][_0x134f43(0x20b)](_0x542e75);_0x5efb79?.[_0x134f43(0x1f7)]||this[_0x134f43(0x1b7)](_0x542e75);}[_0x59bc08(0x1da)](){const _0x4706f1=_0x59bc08;if(0x0===this[_0x4706f1(0x1c1)][_0x4706f1(0x1e4)])return;for(const _0x1b7bd4 of this[_0x4706f1(0x1c1)][_0x4706f1(0x1e3)]())this[_0x4706f1(0x1b7)](_0x1b7bd4[_0x4706f1(0x1ed)]);const _0xe79224=this[_0x4706f1(0x1b3)][_0x4706f1(0x20b)](_0x4706f1(0x23a))||this[_0x4706f1(0x1c1)][_0x4706f1(0x20b)](_0x4706f1(0x23a));_0xe79224&&this[_0x4706f1(0x20e)]({..._0xe79224,'isReadOnly':!0x0,'hidden':!0x0});}[_0x59bc08(0x1b0)](_0x1134de){const _0x350866=_0x59bc08;for(const _0x553ea2 of _0x1134de[_0x350866(0x1e3)]())this[_0x350866(0x1e8)](_0x553ea2);this[_0x350866(0x1da)](),this[_0x350866(0x21d)](_0x350866(0x1e9),{'contextItems':Array[_0x350866(0x211)](this[_0x350866(0x1bb)]()[_0x350866(0x1e3)]())});}[_0x59bc08(0x1de)](){const _0x272ec9=_0x59bc08;return this[_0x272ec9(0x1c1)][_0x272ec9(0x1d1)](_0x272ec9(0x23a));}[_0x59bc08(0x1c3)](){const _0x24399e=_0x59bc08;return this[_0x24399e(0x1c1)][_0x24399e(0x1d1)](_0x24399e(0x212));}[_0x59bc08(0x1f5)](){const _0x332537=_0x59bc08;return this[_0x332537(0x1b3)][_0x332537(0x1d1)](_0x332537(0x23a));}static[_0x59bc08(0x208)](_0x2202e3){const _0x5acf9d=_0x59bc08;return Array[_0x5acf9d(0x211)](_0x2202e3[_0x5acf9d(0x1e3)]())[_0x5acf9d(0x1bd)](_0x43cbbd=>this[_0x5acf9d(0x1ea)](_0x43cbbd))[_0x5acf9d(0x21a)](_0xd37df8=>null!==_0xd37df8);}async[_0x59bc08(0x1d2)](_0x2c9a2b,_0x50c9d0,_0x360237=_0xd267e[_0x59bc08(0x1c6)]){const _0x21aec5=_0x59bc08,_0x56ef0e=_0x21aec5(0x1f0)+_0xe945a3();this[_0x21aec5(0x216)](_0x56ef0e);try{await Promise[_0x21aec5(0x1c5)](_0x2c9a2b[_0x21aec5(0x1bd)](async _0x5deafc=>{const _0x3f0ea2=_0x21aec5,_0x191a4d=_0x3f0ea2(0x1d5)+_0xe945a3(),_0x3afb7e=_0x1d2d32(_0x5deafc[_0x3f0ea2(0x1ff)]);try{this[_0x3f0ea2(0x20e)]({'type':_0x360237,'label':_0x50c9d0?.[_0x3f0ea2(0x205)]||_0x3afb7e,'uiId':_0x191a4d,'resourceId':_0x50c9d0?.[_0x3f0ea2(0x23e)]},!0x0);const _0x3f43fb=this[_0x3f0ea2(0x1e5)][_0x3f0ea2(0x1b1)](this[_0x3f0ea2(0x1e0)],_0x5deafc,_0x50c9d0);this[_0x3f0ea2(0x228)][_0x3f0ea2(0x236)](_0x191a4d,_0x3f43fb[_0x3f0ea2(0x237)]);const {id:_0x3cd172}=await _0x3f43fb[_0x3f0ea2(0x1c7)]();this[_0x3f0ea2(0x228)][_0x3f0ea2(0x239)](_0x191a4d),this[_0x3f0ea2(0x1d8)]({'type':_0x360237,'id':_0x3cd172,'label':_0x50c9d0?.[_0x3f0ea2(0x205)]||_0x3afb7e,'uiId':_0x191a4d,'resourceId':_0x50c9d0?.[_0x3f0ea2(0x23e)]},!0x1);}catch(_0x5c377e){this[_0x3f0ea2(0x228)][_0x3f0ea2(0x239)](_0x191a4d);if(!(_0x5c377e instanceof _0x5ebcea&&_0x5c377e[_0x3f0ea2(0x1c2)][_0x3f0ea2(0x20d)](_0x3f0ea2(0x1be)))){const _0x16064c=_0x54bba8[_0x3f0ea2(0x20b)](_0x5c377e[_0x3f0ea2(0x206)])||_0x3f0ea2(0x233),_0x564014=new _0x5ebcea(_0x16064c,null,{'fileName':_0x3afb7e,..._0x5c377e});_0x564014[_0x3f0ea2(0x1c8)]=_0x5c377e[_0x3f0ea2(0x1c8)],this[_0x3f0ea2(0x21d)](_0x3f0ea2(0x1cf),{'error':_0x564014});}this[_0x3f0ea2(0x1b7)](_0x191a4d);}}));}finally{this[_0x21aec5(0x1b8)](_0x56ef0e);}}[_0x59bc08(0x1fd)](_0x9b5066){const _0x58d2f4=_0x59bc08;if(this[_0x58d2f4(0x1de)]())return;const _0x478705={'type':_0xd267e[_0x58d2f4(0x224)],'uiId':_0x58d2f4(0x23a),'label':_0x9b5066,'isReadOnly':this[_0x58d2f4(0x1b3)][_0x58d2f4(0x1d1)](_0x58d2f4(0x23a)),'hidden':this[_0x58d2f4(0x1b3)][_0x58d2f4(0x1d1)](_0x58d2f4(0x23a))};this[_0x58d2f4(0x20e)](_0x478705);}async[_0x59bc08(0x1b6)](_0x311ca2,_0x1ef673,_0x5d1f89,_0x325b42){const _0x179704=_0x59bc08,_0x4e6ba3=this[_0x179704(0x1c1)][_0x179704(0x20b)](_0x179704(0x23a));if(_0x4e6ba3&&_0x311ca2){_0x4e6ba3[_0x179704(0x212)]=_0x325b42?_0x325b42[_0x179704(0x1bd)](_0x1a8864=>({'start':_0x1a8864[_0x179704(0x23c)],'end':_0x1a8864[_0x179704(0x1cb)]})):[];try{if(_0x4e6ba3[_0x179704(0x1fa)]===_0x1ef673)return;const {id:_0x46e8a8}=await this[_0x179704(0x1e5)][_0x179704(0x1e1)](this[_0x179704(0x1e0)],_0x311ca2,{'version':_0x1ef673,'sessionId':_0x5d1f89})[_0x179704(0x1c7)]();_0x4e6ba3['id']=_0x46e8a8,_0x4e6ba3[_0x179704(0x1ef)]=_0x311ca2,_0x4e6ba3[_0x179704(0x1fa)]=_0x1ef673,_0x4e6ba3[_0x179704(0x235)]=_0x5d1f89;}catch(_0x49a070){const _0x47fb07=new _0x5ebcea(_0x179704(0x1f6),null);_0x47fb07[_0x179704(0x1c8)]=_0x49a070[_0x179704(0x1c8)],this[_0x179704(0x21d)](_0x179704(0x1cf),{'error':_0x47fb07});}}}[_0x59bc08(0x210)](_0x560bbb){const _0x1f8a79=_0x59bc08;this[_0x1f8a79(0x20e)]({'type':_0xd267e[_0x1f8a79(0x214)],'label':_0x560bbb,'uiId':_0x1f8a79(0x212),'content':_0x560bbb});}[_0x59bc08(0x218)](){const _0x495741=_0x59bc08;this[_0x495741(0x1b7)](_0x495741(0x212));}async[_0x59bc08(0x1ba)](_0x21c441,_0x173363){const _0x417a42=_0x59bc08,_0x461c8b=_0x417a42(0x21b)+_0xe945a3();this[_0x417a42(0x216)](_0x461c8b);const _0x348412=_0x417a42(0x21b)+_0xe945a3();try{this[_0x417a42(0x20e)]({'type':_0xd267e[_0x417a42(0x229)],'label':_0x173363?.[_0x417a42(0x205)]||_0x21c441,'uiId':_0x348412,'resourceId':_0x173363?.[_0x417a42(0x23e)]},!0x0);const _0x308638=this[_0x417a42(0x1e5)][_0x417a42(0x22e)](this[_0x417a42(0x1e0)],_0x21c441,_0x173363);this[_0x417a42(0x228)][_0x417a42(0x236)](_0x348412,_0x308638[_0x417a42(0x237)]);const {id:_0x5b70e1}=await _0x308638[_0x417a42(0x1c7)]();this[_0x417a42(0x228)][_0x417a42(0x239)](_0x348412),this[_0x417a42(0x1d8)]({'type':_0xd267e[_0x417a42(0x229)],'id':_0x5b70e1,'label':_0x173363?.[_0x417a42(0x205)]||_0x21c441,'uiId':_0x348412,'resourceId':_0x173363?.[_0x417a42(0x23e)]},!0x1);}catch(_0x36eb65){this[_0x417a42(0x228)][_0x417a42(0x239)](_0x348412),(_0x36eb65[_0x417a42(0x1c2)][_0x417a42(0x20d)](_0x417a42(0x1be))||this[_0x417a42(0x21d)](_0x417a42(0x1cf),{'error':new _0x5ebcea(_0x417a42(0x1d6),this,{'url':_0x21c441,'originalError':_0x36eb65}),'url':_0x21c441}),this[_0x417a42(0x1b7)](_0x348412));}finally{this[_0x417a42(0x1b8)](_0x461c8b);}}async[_0x59bc08(0x22f)](_0x56c667,_0x126901,_0x237883){const _0x575c4d=_0x59bc08,_0x3e392a=this[_0x575c4d(0x1fb)][_0x575c4d(0x1bc)][_0x575c4d(0x21e)](_0x1f15f4=>_0x1f15f4['id']===_0x56c667);if(!_0x3e392a)return this[_0x575c4d(0x21d)](_0x575c4d(0x1cf),{'error':new _0x5ebcea(_0x575c4d(0x1cd),this,{'sourceId':_0x56c667}),'sourceId':_0x56c667}),[];try{const _0x467db3=(await _0x3e392a[_0x575c4d(0x202)](_0x126901))[_0x575c4d(0x1bd)](_0x2e4496=>{const _0x170a65=_0x575c4d,_0x58d975=this[_0x170a65(0x207)](_0x2e4496['id']);return{..._0x2e4496,'isInContext':_0x58d975};});return _0x3e392a[_0x575c4d(0x1e6)]=_0x467db3,this[_0x575c4d(0x21d)](_0x575c4d(0x1c9),{'sourceId':_0x56c667,'source':_0x3e392a,'resources':_0x467db3,'uid':_0x237883}),_0x467db3;}catch(_0x2f9c6e){return this[_0x575c4d(0x21d)](_0x575c4d(0x1cf),{'error':new _0x5ebcea(_0x575c4d(0x1ec),this,{'sourceId':_0x56c667,'originalError':_0x2f9c6e}),'sourceId':_0x56c667,'sourceLabel':_0x3e392a[_0x575c4d(0x205)]}),[];}}async[_0x59bc08(0x1bf)](_0x23dc19,_0x492448){const _0x312ac1=_0x59bc08;if(this[_0x312ac1(0x207)](_0x492448['id']))return;let _0x41303e=_0x492448[_0x312ac1(0x1c0)];if(!_0x41303e&&_0x23dc19[_0x312ac1(0x1b5)])try{_0x41303e=await _0x23dc19[_0x312ac1(0x1b5)](_0x492448['id']);}catch(_0x5152dc){return void this[_0x312ac1(0x21d)](_0x312ac1(0x1cf),{'error':new _0x5ebcea(_0x312ac1(0x22b),this,{'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id'],'originalError':_0x5152dc}),'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']});}if(_0x41303e)switch(_0x492448[_0x312ac1(0x1af)]){case _0xd267e[_0x312ac1(0x229)]:if(_0x312ac1(0x1e2)!=typeof _0x41303e)return void this[_0x312ac1(0x21d)](_0x312ac1(0x1cf),{'error':new _0x5ebcea(_0x312ac1(0x1f1),this,{'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id'],'expectedType':_0x312ac1(0x1e2),'actualType':typeof _0x41303e}),'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']});await this[_0x312ac1(0x1ba)](_0x41303e,{'label':_0x492448[_0x312ac1(0x205)],'resourceId':_0x492448['id']});break;case _0xd267e[_0x312ac1(0x1c6)]:if(!(_0x41303e instanceof File))return void this[_0x312ac1(0x21d)](_0x312ac1(0x1cf),{'error':new _0x5ebcea(_0x312ac1(0x1f1),this,{'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id'],'expectedType':_0x312ac1(0x223),'actualType':typeof _0x41303e}),'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']});await this[_0x312ac1(0x1d2)]([_0x41303e],{'label':_0x492448[_0x312ac1(0x205)],'resourceId':_0x492448['id']});break;case _0xd267e[_0x312ac1(0x1b2)]:if(_0x312ac1(0x222)!=typeof _0x41303e||!(_0x312ac1(0x1ef)in _0x41303e)||!(_0x312ac1(0x1af)in _0x41303e))return void this[_0x312ac1(0x21d)](_0x312ac1(0x1cf),{'error':new _0x5ebcea(_0x312ac1(0x1f1),this,{'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id'],'expectedType':_0x312ac1(0x1e7),'actualType':typeof _0x41303e}),'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']});_0x41303e=AIChatContext[_0x312ac1(0x1d3)](_0x41303e,_0x492448[_0x312ac1(0x205)]),await this[_0x312ac1(0x1d2)]([_0x41303e],{'label':_0x492448[_0x312ac1(0x205)],'resourceId':_0x492448['id']},_0xd267e[_0x312ac1(0x1b2)]);break;default:this[_0x312ac1(0x21d)](_0x312ac1(0x1cf),{'error':new _0x5ebcea(_0x312ac1(0x1dc),this,{'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id'],'resourceType':_0x492448[_0x312ac1(0x1af)]}),'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']});}else this[_0x312ac1(0x21d)](_0x312ac1(0x1cf),{'error':new _0x5ebcea(_0x312ac1(0x22a),this,{'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']}),'resourceId':_0x492448['id'],'sourceId':_0x23dc19['id']});}static[_0x59bc08(0x1d3)](_0x23783e,_0xa7ab4c){const _0x32ca00=_0x59bc08;switch(_0x23783e[_0x32ca00(0x1af)]){case _0x3f6228[_0x32ca00(0x221)]:return new File([_0x23783e[_0x32ca00(0x1ef)]],_0xa7ab4c,{'type':_0x32ca00(0x1d9)});case _0x3f6228[_0x32ca00(0x20c)]:return new File([_0x23783e[_0x32ca00(0x1ef)]],_0xa7ab4c,{'type':_0x32ca00(0x226)});default:return new File([_0x23783e[_0x32ca00(0x1ef)]],_0xa7ab4c,{'type':_0x32ca00(0x1eb)});}}static[_0x59bc08(0x1ea)](_0x372787){const _0x79c5b4=_0x59bc08;switch(_0x372787[_0x79c5b4(0x1af)]){case _0xd267e[_0x79c5b4(0x1c6)]:return{'type':_0xd267e[_0x79c5b4(0x1c6)],'id':_0x372787['id']};case _0xd267e[_0x79c5b4(0x229)]:return{'type':_0xd267e[_0x79c5b4(0x229)],'id':_0x372787['id']};case _0xd267e[_0x79c5b4(0x224)]:return{'type':_0xd267e[_0x79c5b4(0x224)],'id':_0x372787['id'],..._0x372787[_0x79c5b4(0x212)]?.[_0x79c5b4(0x1ce)]&&{'selection':_0x372787[_0x79c5b4(0x212)]}};case _0xd267e[_0x79c5b4(0x1b2)]:return{'type':_0xd267e[_0x79c5b4(0x1c6)],'id':_0x372787['id']};default:return null;}}[_0x59bc08(0x20e)](_0x242257,_0x23442c=!0x1){const _0x167246=_0x59bc08;if(this[_0x167246(0x1c1)][_0x167246(0x236)](_0x242257[_0x167246(0x1ed)],_0x242257),_0x242257[_0x167246(0x1b9)]||this[_0x167246(0x21d)](_0x167246(0x1db),{'contextItem':_0x242257,'isLoading':_0x23442c}),_0x167246(0x23a)===_0x242257[_0x167246(0x1ed)]&&this[_0x167246(0x225)](),_0x242257[_0x167246(0x23e)]){const _0x32880a=this[_0x167246(0x1f3)](_0x242257[_0x167246(0x23e)]);_0x32880a&&_0x32880a[_0x167246(0x21f)](_0x5564cd=>{const _0x3834d4=_0x167246;this[_0x3834d4(0x1cc)](_0x5564cd,_0x242257[_0x3834d4(0x23e)],!0x0);});}}[_0x59bc08(0x1b7)](_0x5822ba){const _0x1a3894=_0x59bc08,_0x47c22f=this[_0x1a3894(0x1c1)][_0x1a3894(0x20b)](_0x5822ba),_0x278a80=this[_0x1a3894(0x228)][_0x1a3894(0x20b)](_0x5822ba);if(_0x278a80&&(_0x278a80[_0x1a3894(0x213)](),this[_0x1a3894(0x228)][_0x1a3894(0x239)](_0x5822ba)),_0x47c22f?.[_0x1a3894(0x23e)]){const _0x4fae83=this[_0x1a3894(0x1f3)](_0x47c22f[_0x1a3894(0x23e)]);_0x4fae83&&_0x4fae83[_0x1a3894(0x21f)](_0x464771=>{const _0x120bb1=_0x1a3894;this[_0x120bb1(0x1cc)](_0x464771,_0x47c22f[_0x120bb1(0x23e)],!0x1);});}this[_0x1a3894(0x1c1)][_0x1a3894(0x239)](_0x5822ba),this[_0x1a3894(0x21d)](_0x1a3894(0x209),{'uiId':_0x5822ba,'type':_0x47c22f?.[_0x1a3894(0x1af)]}),_0x1a3894(0x23a)===_0x5822ba&&this[_0x1a3894(0x225)]();}[_0x59bc08(0x1d8)](_0x167b36,_0x42da42){const _0x370343=_0x59bc08;if(this[_0x370343(0x1c1)][_0x370343(0x1d1)](_0x167b36[_0x370343(0x1ed)])&&(this[_0x370343(0x1c1)][_0x370343(0x236)](_0x167b36[_0x370343(0x1ed)],_0x167b36),this[_0x370343(0x21d)](_0x370343(0x1d4),{'contextItem':_0x167b36,'isLoading':_0x42da42}),_0x167b36[_0x370343(0x23e)])){const _0x40b621=this[_0x370343(0x1f3)](_0x167b36[_0x370343(0x23e)]);_0x40b621&&_0x40b621[_0x370343(0x21f)](_0x433b77=>{const _0x5a50f6=_0x370343;this[_0x5a50f6(0x1cc)](_0x433b77,_0x167b36[_0x5a50f6(0x23e)],!0x0);});}}[_0x59bc08(0x1e8)](_0x22dc2b){const _0x5b2ee0=_0x59bc08;this[_0x5b2ee0(0x1b3)][_0x5b2ee0(0x236)](_0x22dc2b[_0x5b2ee0(0x1ed)],_0x22dc2b);}[_0x59bc08(0x215)](){const _0x247940=_0x59bc08;this[_0x247940(0x1fb)]={'document':{'enabled':!0x1!==this[_0x247940(0x20f)]?.[_0x247940(0x203)]?.[_0x247940(0x234)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x247940(0x20f)]?.[_0x247940(0x1d7)]?.[_0x247940(0x234)]},'files':{'enabled':!0x1!==this[_0x247940(0x20f)]?.[_0x247940(0x20a)]?.[_0x247940(0x234)]},'sources':this[_0x247940(0x1d0)]()},this[_0x247940(0x21d)](_0x247940(0x23d),{'options':this[_0x247940(0x1fb)]});}[_0x59bc08(0x1d0)](){const _0x145fd9=_0x59bc08;return this[_0x145fd9(0x20f)]?.[_0x145fd9(0x1bc)]?.[_0x145fd9(0x1bd)](_0x19ec0c=>({..._0x19ec0c,'resources':[]}))??[];}[_0x59bc08(0x225)](){const _0x22a2c0=_0x59bc08,_0x32eb93=this[_0x22a2c0(0x1de)]()||this[_0x22a2c0(0x1f5)]();this[_0x22a2c0(0x1fb)][_0x22a2c0(0x203)][_0x22a2c0(0x23b)]=_0x32eb93,this[_0x22a2c0(0x21d)](_0x22a2c0(0x23d),{'options':this[_0x22a2c0(0x1fb)]});}[_0x59bc08(0x207)](_0x4e6e4e){const _0x35aada=_0x59bc08;for(const _0x49043e of this[_0x35aada(0x1c1)][_0x35aada(0x1e3)]())if(_0x49043e[_0x35aada(0x23e)]===_0x4e6e4e)return!0x0;for(const _0x1768eb of this[_0x35aada(0x1b3)][_0x35aada(0x1e3)]())if(_0x1768eb[_0x35aada(0x23e)]===_0x4e6e4e)return!0x0;return!0x1;}[_0x59bc08(0x1f3)](_0x553463){const _0x25629f=_0x59bc08,_0x11d945=[];for(const _0x346b22 of this[_0x25629f(0x1fb)][_0x25629f(0x1bc)]){_0x346b22[_0x25629f(0x1e6)][_0x25629f(0x21e)](_0x1ea344=>_0x1ea344['id']===_0x553463)&&_0x11d945[_0x25629f(0x1f9)](_0x346b22['id']);}return 0x0===_0x11d945[_0x25629f(0x1ce)]?null:_0x11d945;}[_0x59bc08(0x1cc)](_0x64a84b,_0x22d5bc,_0x44c21d){const _0x5cb424=_0x59bc08,_0xa5b35b=this[_0x5cb424(0x1fb)][_0x5cb424(0x1bc)][_0x5cb424(0x21e)](_0x12d956=>_0x12d956['id']===_0x64a84b);if(!_0xa5b35b)return;const _0x4f897f=_0xa5b35b[_0x5cb424(0x1e6)][_0x5cb424(0x21e)](_0x2788c8=>_0x2788c8['id']===_0x22d5bc);_0x4f897f&&(_0x4f897f[_0x5cb424(0x238)]=_0x44c21d,this[_0x5cb424(0x21d)](_0x5cb424(0x1ee),{'sourceId':_0x64a84b,'resourceId':_0x22d5bc,'isInContext':_0x44c21d}));}[_0x59bc08(0x216)](_0x29c215){const _0x4014d9=_0x59bc08;this[_0x4014d9(0x22d)][_0x4014d9(0x236)](_0x29c215,!0x0),this[_0x4014d9(0x22d)][_0x4014d9(0x1e4)]&&this[_0x4014d9(0x21d)](_0x4014d9(0x1fc),{'isUploadInProgress':!0x0});}[_0x59bc08(0x1b8)](_0x45a00e){const _0x3ef0d3=_0x59bc08;this[_0x3ef0d3(0x22d)][_0x3ef0d3(0x239)](_0x45a00e),0x0===this[_0x3ef0d3(0x22d)][_0x3ef0d3(0x1e4)]&&this[_0x3ef0d3(0x21d)](_0x3ef0d3(0x1fc),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2306c6=_0x5755;(function(_0x3f7c55,_0x1e334c){const _0xdcc68d=_0x5755,_0x53a3ca=_0x3f7c55();while(!![]){try{const _0x52ca9a=-parseInt(_0xdcc68d(0xec))/0x1*(parseInt(_0xdcc68d(0xd9))/0x2)+-parseInt(_0xdcc68d(0xfd))/0x3*(-parseInt(_0xdcc68d(0xdd))/0x4)+parseInt(_0xdcc68d(0xd7))/0x5+parseInt(_0xdcc68d(0xaa))/0x6*(-parseInt(_0xdcc68d(0xc1))/0x7)+-parseInt(_0xdcc68d(0xb6))/0x8*(-parseInt(_0xdcc68d(0xa6))/0x9)+parseInt(_0xdcc68d(0xb7))/0xa*(parseInt(_0xdcc68d(0xf0))/0xb)+parseInt(_0xdcc68d(0xbd))/0xc;if(_0x52ca9a===_0x1e334c)break;else _0x53a3ca['push'](_0x53a3ca['shift']());}catch(_0x112c23){_0x53a3ca['push'](_0x53a3ca['shift']());}}}(_0x1fa4,0xa8d38));import{CKEditorError as _0x340a07,EmitterMixin as _0x5885af,logWarning as _0x57c52a}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x1704ab}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1faa1e,AI_CONTEXT_MODEL_EVENT_NAMES as _0x35a2e1}from'./aichatcontext.js';import{AICapabilities as _0x26d618,CAPABILITIES_MODEL_EVENT_NAMES as _0x31c8e2}from'../../aicore/model/aicapabilities.js';function _0x5755(_0x4a0d27,_0x2f7737){const _0x1fa4b0=_0x1fa4();return _0x5755=function(_0x57552f,_0x37cb8b){_0x57552f=_0x57552f-0xa3;let _0x11e0f8=_0x1fa4b0[_0x57552f];return _0x11e0f8;},_0x5755(_0x4a0d27,_0x2f7737);}import{AIChatInteraction as _0x610ae6}from'./aichatinteraction.js';function _0x1fa4(){const _0x49f24b=['getAll','toLowerCase','ai-chat-conversation-start-no-model-selected','ai-chat-handle-user-interaction-already-in-progress','336459WtUzFk','find','set','message','interactions','delegate','title','handleUserInteraction','loadSourceResources','capabilities','destroy','getCurrentDocumentContext','getDocumentContext','group','toggleReasoning','addToConversationContext','user','init','modelSelected','prompt','updateCurrentDocument','type','stop','getCapabilitiesConfig','updateCurrentDocumentInContext','ai-chat-conversation-init-failed','sessionId','connector','addFilesToContext','text','_extractContextItems','getAvailableModels','toggleWebSearch','27DHiaFw','interactionCreated','webSearch','get','98466zmKrjl','splice','stack','fetchConversation','currentInteraction','lastInteraction','start','attributes','code','ai-chat-handle-user-conversation-not-initialized','isCurrentDocumentInConversation','addSelectionToContext','169104BxveGh','5175470ZWkyMT','addCurrentDocumentToContext','currentReply','addResourceToContext','conversationId','ai-chat-handle-user-interaction-start-failed','2811756gSOvXK','ai-chat-conversation-init-from-id-failed','isCurrentDocumentInContext','chatContext','560okclkD','addUrlToContext','populateFromMessage','chatCapabilities','setModel','chatModels','createReply','isStarted','push','assistant','appendContent','indexOf','isSelectionInContext','ai-chat-conversation-set-model-not-available','selectedModelId','quickActionData','getConversation','contextItems','setConversationTitle','getEditor','ai-chat-conversation-set-model-null','load','4908965boNhwj','getInteraction','258268BcoEPM','conversationInitialized','error','length','12iIlsjn','conversationStarted','options','reasoning','createInteraction','removeSelectionFromContext','removeInteraction','role','text-delta','removeFromContext','ai-chat-conversation-already-started','_processMessagesToInteractions','startConversation','selectedModel','ai-chat-conversation-start-failed','1tjxIal','fire','fetchConversationMessages','getMessages','11obPyzK','getModel','reset','content','hasOwn','getPendingContextItems','modification-delta','isAvailable','model'];_0x1fa4=function(){return _0x49f24b;};return _0x1fa4();}import{errorsMap as _0x346be0}from'../../errorsmap.js';export class AIChatConversation extends _0x5885af(){['id'];[_0x2306c6(0xc8)]=!0x1;[_0x2306c6(0x101)]=[];[_0x2306c6(0xae)];[_0x2306c6(0xea)];[_0x2306c6(0x118)];[_0x2306c6(0xdf)];constructor(_0x5233df){const _0x214de3=_0x2306c6;super(),this[_0x214de3(0xdf)]=_0x5233df,this[_0x214de3(0x118)]=_0x5233df[_0x214de3(0x118)],this[_0x214de3(0xc6)]=_0x5233df[_0x214de3(0xc6)],this['id']=_0x5233df[_0x214de3(0xbb)];}async[_0x2306c6(0x10e)](_0x36daef){const _0x5141e8=_0x2306c6;try{this[_0x5141e8(0xc0)]=new _0x1faa1e({'connector':this[_0x5141e8(0x118)],'config':_0x36daef,'ownerId':this['id']}),this[_0x5141e8(0xc0)][_0x5141e8(0x102)](..._0x35a2e1)['to'](this),this[_0x5141e8(0xc0)][_0x5141e8(0x10e)](),this[_0x5141e8(0xc4)]=new _0x26d618(),this[_0x5141e8(0xc4)][_0x5141e8(0x102)](..._0x31c8e2)['to'](this),this[_0x5141e8(0xc4)][_0x5141e8(0x10e)]();const _0x57c15e=await this[_0x5141e8(0xc6)][_0x5141e8(0xa4)]();this[_0x5141e8(0xed)](_0x5141e8(0xda),{'availableModels':_0x57c15e});const _0x492953=await this[_0x5141e8(0xc6)][_0x5141e8(0xf1)](this[_0x5141e8(0xdf)][_0x5141e8(0xcf)]);_0x492953&&await this[_0x5141e8(0xc5)](_0x492953);}catch(_0x224446){const _0x1c34cb=new _0x340a07(_0x5141e8(0x116),null,{'message':_0x224446[_0x5141e8(0x100)]||_0x224446});_0x1c34cb[_0x5141e8(0xac)]=_0x224446[_0x5141e8(0xac)],this[_0x5141e8(0xed)](_0x5141e8(0xdb),{'error':_0x1c34cb});}}async[_0x2306c6(0xb0)](){const _0x232a30=_0x2306c6;if(this[_0x232a30(0xc8)])throw new _0x340a07(_0x232a30(0xe7),null,{'conversation':this});if(!this[_0x232a30(0xea)])throw new _0x340a07(_0x232a30(0xfb),null,{'conversation':this});try{const {id:_0x1b9dd8}=await this[_0x232a30(0x118)][_0x232a30(0xe9)](this['id'],this[_0x232a30(0xdf)][_0x232a30(0x10a)])[_0x232a30(0xd1)]();this['id']=_0x1b9dd8,this[_0x232a30(0xc8)]=!0x0,this[_0x232a30(0xed)](_0x232a30(0xde),{'conversationId':this['id'],'selectedModel':this[_0x232a30(0xea)]});}catch(_0x5a4411){const _0xf4f21=new _0x340a07(_0x232a30(0xeb),null,{'message':_0x5a4411[_0x232a30(0x100)],'conversationId':this['id']});throw _0xf4f21[_0x232a30(0xac)]=_0x5a4411[_0x232a30(0xac)],this[_0x232a30(0xed)](_0x232a30(0xdb),{'error':_0xf4f21}),_0xf4f21;}}async[_0x2306c6(0xd6)](_0x2dc415,_0x56ecfa){const _0x42732a=_0x2306c6;try{const _0x1692b9=await this[_0x42732a(0x118)][_0x42732a(0xad)](_0x2dc415)[_0x42732a(0xd1)](),_0x33776b=await this[_0x42732a(0x118)][_0x42732a(0xee)](_0x2dc415)[_0x42732a(0xef)](),_0x2fed9c=_0x33776b[0x0][_0x42732a(0xf8)];this[_0x42732a(0xc8)]=!0x0,this['id']=_0x1692b9['id'],_0x42732a(0x103)in _0x1692b9?this[_0x42732a(0xed)](_0x42732a(0xd3),_0x1692b9[_0x42732a(0x103)],!0x0):this[_0x42732a(0xed)](_0x42732a(0xd3),'',!0x0);const _0x24c0f4=(await this[_0x42732a(0xc6)][_0x42732a(0xf9)]())[_0x42732a(0xfe)](_0x22fbae=>_0x22fbae['id'][_0x42732a(0xfa)]()===_0x2fed9c[_0x42732a(0xfa)]());return this[_0x42732a(0xea)]=_0x24c0f4,this[_0x42732a(0xed)](_0x42732a(0x10f),{'selectedModel':_0x24c0f4,'isDisabled':!0x0}),await this[_0x42732a(0xe8)](_0x33776b,_0x56ecfa,_0x2fed9c),this[_0x42732a(0xae)]=void 0x0,this;}catch(_0xbd27f){const _0x2f56fd=new _0x340a07(_0x42732a(0xbe),null,{'message':_0xbd27f[_0x42732a(0x100)],'conversationId':_0x2dc415});throw _0x2f56fd[_0x42732a(0xac)]=_0xbd27f[_0x42732a(0xac)],this[_0x42732a(0xed)](_0x42732a(0xdb),{'error':_0x2f56fd}),_0x2f56fd;}}async[_0x2306c6(0xe8)](_0x10a159,_0x29b326,_0x5a6e51){const _0x7fd3ae=_0x2306c6;let _0x3e2163;for(const _0x2260ad of _0x10a159)if(_0x7fd3ae(0x10d)===_0x2260ad[_0x7fd3ae(0xe4)]){const _0x425a79=await this[_0x7fd3ae(0xa3)](_0x2260ad),_0x9f5a4b={'isReasoningEnabled':Object[_0x7fd3ae(0xf4)](_0x2260ad[_0x7fd3ae(0x106)],_0x7fd3ae(0xe0)),'isWebSearchEnabled':Object[_0x7fd3ae(0xf4)](_0x2260ad[_0x7fd3ae(0x106)],_0x7fd3ae(0xa8))};_0x3e2163=this[_0x7fd3ae(0xe1)]({'userMessage':_0x2260ad[_0x7fd3ae(0x110)],'contextItems':_0x425a79,'capabilities':_0x9f5a4b,'modelId':_0x5a6e51,'quickActionData':_0x2260ad[_0x7fd3ae(0xb1)]?.[_0x7fd3ae(0xd0)]}),this[_0x7fd3ae(0xae)]=_0x3e2163,this[_0x7fd3ae(0xc0)][_0x7fd3ae(0x10c)](this[_0x7fd3ae(0xae)][_0x7fd3ae(0xd2)]);}else{if(_0x7fd3ae(0xca)===_0x2260ad[_0x7fd3ae(0xe4)]&&_0x3e2163)for(const _0x5662c6 of _0x2260ad[_0x7fd3ae(0xf3)]){const _0x45cf89=_0x7fd3ae(0x11a)===_0x5662c6[_0x7fd3ae(0x112)]?_0x7fd3ae(0xe5):_0x7fd3ae(0xf6),_0x1a6e55=_0x3e2163[_0x7fd3ae(0x109)]()?.[_0x7fd3ae(0x117)]!==_0x29b326;_0x3e2163[_0x7fd3ae(0xb9)]=_0x3e2163[_0x7fd3ae(0xc7)]({'type':_0x45cf89,'isDone':!0x0,'interactionId':_0x3e2163['id'],'areActionsDisabled':_0x1a6e55}),_0x3e2163[_0x7fd3ae(0xb9)][_0x7fd3ae(0xcb)](_0x5662c6[_0x7fd3ae(0xf3)]);}}}async[_0x2306c6(0xa3)](_0x4817b4){const _0x2777f9=_0x2306c6,_0x38d9dd=new Map();if(!_0x4817b4[_0x2777f9(0xf3)])return _0x38d9dd;for(const _0x243534 of _0x4817b4[_0x2777f9(0xf3)]){const _0x177e61=await this[_0x2777f9(0xc0)][_0x2777f9(0xc3)](_0x243534);_0x177e61&&_0x38d9dd[_0x2777f9(0xff)](_0x177e61['id'],_0x177e61);}return _0x38d9dd;}async[_0x2306c6(0x104)]({userMessage:_0xa45f5e,quickActionData:_0x553a6d}){const _0x420b5a=_0x2306c6;if(!this[_0x420b5a(0xc8)])throw new _0x340a07(_0x420b5a(0xb3),null,{'conversation':this});if(this[_0x420b5a(0xae)])throw new _0x340a07(_0x420b5a(0xfc),null,{'conversation':this});try{const _0x1568f0=this[_0x420b5a(0xc0)][_0x420b5a(0xf5)](),_0x4d7442=this[_0x420b5a(0xc4)][_0x420b5a(0x114)](),_0x4a5025=this[_0x420b5a(0xea)]['id'];this[_0x420b5a(0xae)]=this[_0x420b5a(0xe1)]({'userMessage':_0xa45f5e,'contextItems':_0x1568f0,'capabilities':_0x4d7442,'modelId':_0x4a5025,'quickActionData':_0x553a6d}),await this[_0x420b5a(0xae)][_0x420b5a(0xb0)](),this[_0x420b5a(0xc0)][_0x420b5a(0x10c)](this[_0x420b5a(0xae)][_0x420b5a(0xd2)]);}catch(_0x2a7d7d){if(_0x2a7d7d instanceof _0x340a07)this[_0x420b5a(0xed)](_0x420b5a(0xdb),{'interactionId':this[_0x420b5a(0xae)]?this[_0x420b5a(0xae)]['id']:void 0x0,'error':_0x2a7d7d});else{const _0x4bca79=_0x346be0[_0x420b5a(0xa9)](_0x2a7d7d[_0x420b5a(0xb2)])||_0x420b5a(0xbc);this[_0x420b5a(0xed)](_0x420b5a(0xdb),{'interactionId':this[_0x420b5a(0xae)]?this[_0x420b5a(0xae)]['id']:void 0x0,'error':new _0x340a07(_0x4bca79,null,{'error':_0x2a7d7d})});}}finally{this[_0x420b5a(0xae)]?.[_0x420b5a(0x113)](),this[_0x420b5a(0xae)]=void 0x0;}}[_0x2306c6(0xe1)]({userMessage:_0x17d0e3,contextItems:_0x12124e,capabilities:_0x554577,modelId:_0x2e0514,quickActionData:_0x546326}){const _0x215287=_0x2306c6,_0x400eea=new _0x610ae6({'userMessage':_0x17d0e3,'contextItems':_0x12124e,'capabilities':_0x554577,'conversationId':this['id'],'connector':this[_0x215287(0x118)],'editor':this[_0x215287(0xdf)][_0x215287(0xd4)]&&this[_0x215287(0xdf)][_0x215287(0xd4)](),'model':_0x2e0514,'quickActionData':_0x546326});return _0x400eea[_0x215287(0x102)](..._0x1704ab)['to'](this),this[_0x215287(0x101)][_0x215287(0xc9)](_0x400eea),this[_0x215287(0xed)](_0x215287(0xa7),_0x400eea),_0x400eea;}[_0x2306c6(0xd8)](_0x468198){const _0x44b656=_0x2306c6;return this[_0x44b656(0x101)][_0x44b656(0xfe)](_0x400c00=>_0x400c00['id']===_0x468198);}[_0x2306c6(0xe3)](_0x55d31c){const _0x46cf83=_0x2306c6,_0x127a4c=this[_0x46cf83(0xd8)](_0x55d31c);_0x127a4c&&(_0x127a4c[_0x46cf83(0x107)](),this[_0x46cf83(0x101)][_0x46cf83(0xab)](this[_0x46cf83(0x101)][_0x46cf83(0xcc)](_0x127a4c),0x1));}get[_0x2306c6(0xaf)](){const _0x1f9241=_0x2306c6;return this[_0x1f9241(0x101)][this[_0x1f9241(0x101)][_0x1f9241(0xdc)]-0x1];}[_0x2306c6(0xb8)](_0x43fa3c){const _0xa9b8bf=_0x2306c6;this[_0xa9b8bf(0xc0)][_0xa9b8bf(0xb8)](_0x43fa3c);}async[_0x2306c6(0x115)]({content:_0xb1e644,version:_0x473d71,sessionId:_0x93aaf7,selections:_0x5e4190}){const _0x15930e=_0x2306c6;await this[_0x15930e(0xc0)][_0x15930e(0x111)](_0xb1e644,_0x473d71,_0x93aaf7,_0x5e4190);}[_0x2306c6(0x108)](){const _0x21b8b1=_0x2306c6;return this[_0x21b8b1(0xae)]?.[_0x21b8b1(0x109)]()?.[_0x21b8b1(0xf3)]||'';}[_0x2306c6(0xb5)](_0x120e9a){const _0xf54211=_0x2306c6;this[_0xf54211(0xc0)][_0xf54211(0xb5)](_0x120e9a);}[_0x2306c6(0xe2)](){const _0xf1c6c0=_0x2306c6;this[_0xf1c6c0(0xc0)][_0xf1c6c0(0xe2)]();}[_0x2306c6(0x119)](_0x4f8525){const _0x57f106=_0x2306c6;this[_0x57f106(0xc0)][_0x57f106(0x119)](_0x4f8525);}[_0x2306c6(0xc2)](_0x503fa0){const _0x4cebe1=_0x2306c6;this[_0x4cebe1(0xc0)][_0x4cebe1(0xc2)](_0x503fa0);}[_0x2306c6(0xba)](_0x4925f0,_0x18cfd4){const _0x37f9ac=_0x2306c6;this[_0x37f9ac(0xc0)][_0x37f9ac(0xba)](_0x4925f0,_0x18cfd4);}[_0x2306c6(0x105)](_0x346abc,_0x27e174,_0x396fd0){const _0x54089a=_0x2306c6;return this[_0x54089a(0xc0)][_0x54089a(0x105)](_0x346abc,_0x27e174,_0x396fd0);}[_0x2306c6(0xe6)](_0xa969a1){const _0x56cf38=_0x2306c6;this[_0x56cf38(0xc0)][_0x56cf38(0xe6)](_0xa969a1);}[_0x2306c6(0xa5)](){const _0x369ded=_0x2306c6;this[_0x369ded(0xc4)][_0x369ded(0xa5)]();}[_0x2306c6(0x10b)](){const _0x36f1df=_0x2306c6;this[_0x36f1df(0xc4)][_0x36f1df(0x10b)]();}[_0x2306c6(0xbf)](){const _0x53886c=_0x2306c6;return this[_0x53886c(0xc0)][_0x53886c(0xbf)]();}[_0x2306c6(0xb4)](){const _0x48d209=_0x2306c6;return this[_0x48d209(0xc0)][_0x48d209(0xb4)]();}[_0x2306c6(0xcd)](){const _0x2098fe=_0x2306c6;return this[_0x2098fe(0xc0)][_0x2098fe(0xcd)]();}async[_0x2306c6(0xc5)](_0x3d4d97){const _0x3b40cf=_0x2306c6;_0x3d4d97?!0x1===await this[_0x3b40cf(0xc6)][_0x3b40cf(0xf7)](_0x3d4d97)&&(_0x57c52a(_0x3b40cf(0xce),{'conversation':this,'model':_0x3d4d97}),_0x3d4d97=(await this[_0x3b40cf(0xc6)][_0x3b40cf(0xa4)]())[0x0]):(_0x57c52a(_0x3b40cf(0xd5),{'conversation':this}),_0x3d4d97=(await this[_0x3b40cf(0xc6)][_0x3b40cf(0xa4)]())[0x0]),_0x3d4d97['id']!==this[_0x3b40cf(0xea)]?.['id']&&(this[_0x3b40cf(0xea)]=_0x3d4d97,this[_0x3b40cf(0xc4)][_0x3b40cf(0xf2)](),this[_0x3b40cf(0xed)](_0x3b40cf(0x10f),{'selectedModel':_0x3d4d97}));}}
23
+ const _0x38b1fd=_0x17a4;(function(_0x3d88ad,_0x5ba9ae){const _0x527888=_0x17a4,_0x1224c0=_0x3d88ad();while(!![]){try{const _0x3e921b=parseInt(_0x527888(0x129))/0x1+parseInt(_0x527888(0x13a))/0x2*(parseInt(_0x527888(0x184))/0x3)+parseInt(_0x527888(0x172))/0x4*(-parseInt(_0x527888(0x13c))/0x5)+-parseInt(_0x527888(0x181))/0x6*(parseInt(_0x527888(0x180))/0x7)+-parseInt(_0x527888(0x13b))/0x8+parseInt(_0x527888(0x155))/0x9+-parseInt(_0x527888(0x148))/0xa*(parseInt(_0x527888(0x130))/0xb);if(_0x3e921b===_0x5ba9ae)break;else _0x1224c0['push'](_0x1224c0['shift']());}catch(_0x1f612d){_0x1224c0['push'](_0x1224c0['shift']());}}}(_0x537c,0x9dc9a));import{CKEditorError as _0x2d0456,EmitterMixin as _0x58ca8d,logWarning as _0x477542}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x25055f}from'../../aicore/model/aiinteraction.js';function _0x537c(){const _0x4297a1=['ai-chat-handle-user-interaction-already-in-progress','getCurrentDocumentContext','toggleWebSearch','isAvailable','capabilities','isCurrentDocumentInConversation','splice','addResourceToContext','_processMessagesToInteractions','fire','modelSelected','getEditor','getDocumentContext','chatContext','group','addSelectionToContext','ai-chat-handle-user-conversation-not-initialized','delegate','removeSelectionFromContext','currentReply','stop','getMessages','getPendingContextItems','isCurrentDocumentInContext','_extractContextItems','461042ItWPkP','start','setConversationTitle','lastInteraction','removeInteraction','addUrlToContext','hasOwn','587455DDGvCx','conversationInitialized','getAvailableModels','quickActionData','chatCapabilities','role','code','sessionId','user','error','989498UBvMWS','3348576LjBcKe','4130WrtCDh','updateCurrentDocument','set','selectedModel','stack','ai-chat-conversation-init-failed','toggleReasoning','addFilesToContext','toLowerCase','attributes','length','isStarted','50NNTKpl','message','model','init','prompt','webSearch','appendContent','chatModels','interactionCreated','title','destroy','isSelectionInContext','ai-chat-handle-user-interaction-start-failed','11025702mFVGst','contextItems','getConversation','connector','type','indexOf','fetchConversation','push','conversationId','modification-delta','text','currentInteraction','text-delta','conversationStarted','reset','createInteraction','createReply','ai-chat-conversation-set-model-null','ai-chat-conversation-already-started','assistant','selectedModelId','ai-chat-conversation-start-failed','addToConversationContext','addCurrentDocumentToContext','fetchConversationMessages','interactions','ai-chat-conversation-set-model-not-available','load','loadSourceResources','1524HwgPNP','content','reasoning','startConversation','ai-chat-conversation-start-no-model-selected','options','removeFromContext','getCapabilitiesConfig','setModel','ai-chat-conversation-init-from-id-failed','getInteraction','updateCurrentDocumentInContext','get','populateFromMessage','7203119CbpXsq','6DSRFgQ','getModel','handleUserInteraction','6TsyfmF','getAll','find'];_0x537c=function(){return _0x4297a1;};return _0x537c();}function _0x17a4(_0x2e9f87,_0x10c86c){const _0x537cb3=_0x537c();return _0x17a4=function(_0x17a4e8,_0x5187b5){_0x17a4e8=_0x17a4e8-0x121;let _0x2cc205=_0x537cb3[_0x17a4e8];return _0x2cc205;},_0x17a4(_0x2e9f87,_0x10c86c);}import{AIChatContext as _0x53f609,AI_CONTEXT_MODEL_EVENT_NAMES as _0x265374}from'./aichatcontext.js';import{AICapabilities as _0x4361b3,CAPABILITIES_MODEL_EVENT_NAMES as _0x323ce9}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0xc77839}from'./aichatinteraction.js';import{errorsMap as _0x2f3650}from'../../errorsmap.js';export class AIChatConversation extends _0x58ca8d(){['id'];[_0x38b1fd(0x147)]=!0x1;[_0x38b1fd(0x16e)]=[];[_0x38b1fd(0x160)];[_0x38b1fd(0x13f)];[_0x38b1fd(0x158)];[_0x38b1fd(0x177)];constructor(_0x5db504){const _0x55493a=_0x38b1fd;super(),this[_0x55493a(0x177)]=_0x5db504,this[_0x55493a(0x158)]=_0x5db504[_0x55493a(0x158)],this[_0x55493a(0x14f)]=_0x5db504[_0x55493a(0x14f)],this['id']=_0x5db504[_0x55493a(0x15d)];}async[_0x38b1fd(0x14b)](_0x52f6f5){const _0x254496=_0x38b1fd;try{this[_0x254496(0x194)]=new _0x53f609({'connector':this[_0x254496(0x158)],'config':_0x52f6f5,'ownerId':this['id']}),this[_0x254496(0x194)][_0x254496(0x121)](..._0x265374)['to'](this),this[_0x254496(0x194)][_0x254496(0x14b)](),this[_0x254496(0x134)]=new _0x4361b3(),this[_0x254496(0x134)][_0x254496(0x121)](..._0x323ce9)['to'](this),this[_0x254496(0x134)][_0x254496(0x14b)]();const _0x22c992=await this[_0x254496(0x14f)][_0x254496(0x132)]();this[_0x254496(0x190)](_0x254496(0x131),{'availableModels':_0x22c992});const _0x2dfebb=await this[_0x254496(0x14f)][_0x254496(0x182)](this[_0x254496(0x177)][_0x254496(0x169)]);_0x2dfebb&&await this[_0x254496(0x17a)](_0x2dfebb);}catch(_0x1af493){const _0x758a8d=new _0x2d0456(_0x254496(0x141),null,{'message':_0x1af493[_0x254496(0x149)]||_0x1af493});_0x758a8d[_0x254496(0x140)]=_0x1af493[_0x254496(0x140)],this[_0x254496(0x190)](_0x254496(0x139),{'error':_0x758a8d});}}async[_0x38b1fd(0x12a)](){const _0x3d6b5b=_0x38b1fd;if(this[_0x3d6b5b(0x147)])throw new _0x2d0456(_0x3d6b5b(0x167),null,{'conversation':this});if(!this[_0x3d6b5b(0x13f)])throw new _0x2d0456(_0x3d6b5b(0x176),null,{'conversation':this});try{const {id:_0x132f93}=await this[_0x3d6b5b(0x158)][_0x3d6b5b(0x175)](this['id'],this[_0x3d6b5b(0x177)][_0x3d6b5b(0x195)])[_0x3d6b5b(0x157)]();this['id']=_0x132f93,this[_0x3d6b5b(0x147)]=!0x0,this[_0x3d6b5b(0x190)](_0x3d6b5b(0x162),{'conversationId':this['id'],'selectedModel':this[_0x3d6b5b(0x13f)]});}catch(_0x3046ba){const _0x42ae78=new _0x2d0456(_0x3d6b5b(0x16a),null,{'message':_0x3046ba[_0x3d6b5b(0x149)],'conversationId':this['id']});throw _0x42ae78[_0x3d6b5b(0x140)]=_0x3046ba[_0x3d6b5b(0x140)],this[_0x3d6b5b(0x190)](_0x3d6b5b(0x139),{'error':_0x42ae78}),_0x42ae78;}}async[_0x38b1fd(0x170)](_0x45fa64,_0x535437){const _0x3c7229=_0x38b1fd;try{const _0x17453c=await this[_0x3c7229(0x158)][_0x3c7229(0x15b)](_0x45fa64)[_0x3c7229(0x157)](),_0xf2102d=await this[_0x3c7229(0x158)][_0x3c7229(0x16d)](_0x45fa64)[_0x3c7229(0x125)](),_0x116c55=_0xf2102d[0x0][_0x3c7229(0x14a)];this[_0x3c7229(0x147)]=!0x0,this['id']=_0x17453c['id'],_0x3c7229(0x151)in _0x17453c?this[_0x3c7229(0x190)](_0x3c7229(0x12b),_0x17453c[_0x3c7229(0x151)],!0x0):this[_0x3c7229(0x190)](_0x3c7229(0x12b),'',!0x0);const _0x2c5b88=(await this[_0x3c7229(0x14f)][_0x3c7229(0x185)]())[_0x3c7229(0x186)](_0x3c219d=>_0x3c219d['id'][_0x3c7229(0x144)]()===_0x116c55[_0x3c7229(0x144)]());return this[_0x3c7229(0x13f)]=_0x2c5b88,this[_0x3c7229(0x190)](_0x3c7229(0x191),{'selectedModel':_0x2c5b88,'isDisabled':!0x0}),await this[_0x3c7229(0x18f)](_0xf2102d,_0x535437,_0x116c55),this[_0x3c7229(0x160)]=void 0x0,this;}catch(_0x128a86){const _0x4ef02a=new _0x2d0456(_0x3c7229(0x17b),null,{'message':_0x128a86[_0x3c7229(0x149)],'conversationId':_0x45fa64});throw _0x4ef02a[_0x3c7229(0x140)]=_0x128a86[_0x3c7229(0x140)],this[_0x3c7229(0x190)](_0x3c7229(0x139),{'error':_0x4ef02a}),_0x4ef02a;}}async[_0x38b1fd(0x18f)](_0x347c07,_0x4cba4b,_0xcb348b){const _0x56ae86=_0x38b1fd;let _0x55098f;for(const _0x5701ed of _0x347c07)if(_0x56ae86(0x138)===_0x5701ed[_0x56ae86(0x135)]){const _0xf867d5=await this[_0x56ae86(0x128)](_0x5701ed),_0x342a59={'isReasoningEnabled':Object[_0x56ae86(0x12f)](_0x5701ed[_0x56ae86(0x18b)],_0x56ae86(0x174)),'isWebSearchEnabled':Object[_0x56ae86(0x12f)](_0x5701ed[_0x56ae86(0x18b)],_0x56ae86(0x14d))};_0x55098f=this[_0x56ae86(0x164)]({'userMessage':_0x5701ed[_0x56ae86(0x14c)],'contextItems':_0xf867d5,'capabilities':_0x342a59,'modelId':_0xcb348b,'quickActionData':_0x5701ed[_0x56ae86(0x145)]?.[_0x56ae86(0x133)]}),this[_0x56ae86(0x160)]=_0x55098f,this[_0x56ae86(0x194)][_0x56ae86(0x16b)](this[_0x56ae86(0x160)][_0x56ae86(0x156)]);}else{if(_0x56ae86(0x168)===_0x5701ed[_0x56ae86(0x135)]&&_0x55098f)for(const _0x1144b0 of _0x5701ed[_0x56ae86(0x173)]){const _0x1da5b9=_0x56ae86(0x15f)===_0x1144b0[_0x56ae86(0x159)]?_0x56ae86(0x161):_0x56ae86(0x15e),_0x3fc9ba=_0x55098f[_0x56ae86(0x193)]()?.[_0x56ae86(0x137)]!==_0x4cba4b;_0x55098f[_0x56ae86(0x123)]=_0x55098f[_0x56ae86(0x165)]({'type':_0x1da5b9,'isDone':!0x0,'interactionId':_0x55098f['id'],'areActionsDisabled':_0x3fc9ba}),_0x55098f[_0x56ae86(0x123)][_0x56ae86(0x14e)](_0x1144b0[_0x56ae86(0x173)]);}}}async[_0x38b1fd(0x128)](_0x51777b){const _0x53dc40=_0x38b1fd,_0x4f00bf=new Map();if(!_0x51777b[_0x53dc40(0x173)])return _0x4f00bf;for(const _0x400027 of _0x51777b[_0x53dc40(0x173)]){const _0x2540a4=await this[_0x53dc40(0x194)][_0x53dc40(0x17f)](_0x400027);_0x2540a4&&_0x4f00bf[_0x53dc40(0x13e)](_0x2540a4['id'],_0x2540a4);}return _0x4f00bf;}async[_0x38b1fd(0x183)]({userMessage:_0x591939,quickActionData:_0x3a13a8}){const _0x54275a=_0x38b1fd;if(!this[_0x54275a(0x147)])throw new _0x2d0456(_0x54275a(0x197),null,{'conversation':this});if(this[_0x54275a(0x160)])throw new _0x2d0456(_0x54275a(0x187),null,{'conversation':this});try{const _0x584b3f=this[_0x54275a(0x194)][_0x54275a(0x126)](),_0x365c16=this[_0x54275a(0x134)][_0x54275a(0x179)](),_0x452d75=this[_0x54275a(0x13f)]['id'];this[_0x54275a(0x160)]=this[_0x54275a(0x164)]({'userMessage':_0x591939,'contextItems':_0x584b3f,'capabilities':_0x365c16,'modelId':_0x452d75,'quickActionData':_0x3a13a8}),await this[_0x54275a(0x160)][_0x54275a(0x12a)](),this[_0x54275a(0x194)][_0x54275a(0x16b)](this[_0x54275a(0x160)][_0x54275a(0x156)]);}catch(_0x4b16ba){if(_0x4b16ba instanceof _0x2d0456)this[_0x54275a(0x190)](_0x54275a(0x139),{'interactionId':this[_0x54275a(0x160)]?this[_0x54275a(0x160)]['id']:void 0x0,'error':_0x4b16ba});else{const _0x234fd3=_0x2f3650[_0x54275a(0x17e)](_0x4b16ba[_0x54275a(0x136)])||_0x54275a(0x154);this[_0x54275a(0x190)](_0x54275a(0x139),{'interactionId':this[_0x54275a(0x160)]?this[_0x54275a(0x160)]['id']:void 0x0,'error':new _0x2d0456(_0x234fd3,null,{'error':_0x4b16ba})});}}finally{this[_0x54275a(0x160)]?.[_0x54275a(0x124)](),this[_0x54275a(0x160)]=void 0x0;}}[_0x38b1fd(0x164)]({userMessage:_0x5be2ba,contextItems:_0x4750ca,capabilities:_0x3aca1b,modelId:_0x5c7974,quickActionData:_0x22fc87}){const _0x327b81=_0x38b1fd,_0xac3a56=new _0xc77839({'userMessage':_0x5be2ba,'contextItems':_0x4750ca,'capabilities':_0x3aca1b,'conversationId':this['id'],'connector':this[_0x327b81(0x158)],'editor':this[_0x327b81(0x177)][_0x327b81(0x192)]&&this[_0x327b81(0x177)][_0x327b81(0x192)](),'model':_0x5c7974,'quickActionData':_0x22fc87});return _0xac3a56[_0x327b81(0x121)](..._0x25055f)['to'](this),this[_0x327b81(0x16e)][_0x327b81(0x15c)](_0xac3a56),this[_0x327b81(0x190)](_0x327b81(0x150),_0xac3a56),_0xac3a56;}[_0x38b1fd(0x17c)](_0x62ef55){const _0x14162d=_0x38b1fd;return this[_0x14162d(0x16e)][_0x14162d(0x186)](_0x5843f0=>_0x5843f0['id']===_0x62ef55);}[_0x38b1fd(0x12d)](_0x278831){const _0x74d961=_0x38b1fd,_0x357110=this[_0x74d961(0x17c)](_0x278831);_0x357110&&(_0x357110[_0x74d961(0x152)](),this[_0x74d961(0x16e)][_0x74d961(0x18d)](this[_0x74d961(0x16e)][_0x74d961(0x15a)](_0x357110),0x1));}get[_0x38b1fd(0x12c)](){const _0x2c06d1=_0x38b1fd;return this[_0x2c06d1(0x16e)][this[_0x2c06d1(0x16e)][_0x2c06d1(0x146)]-0x1];}[_0x38b1fd(0x16c)](_0x289c9e){const _0x2f0fc4=_0x38b1fd;this[_0x2f0fc4(0x194)][_0x2f0fc4(0x16c)](_0x289c9e);}async[_0x38b1fd(0x17d)]({content:_0x7c8fda,version:_0x58961c,sessionId:_0x4a725e,selections:_0x4cf9de}){const _0x481148=_0x38b1fd;await this[_0x481148(0x194)][_0x481148(0x13d)](_0x7c8fda,_0x58961c,_0x4a725e,_0x4cf9de);}[_0x38b1fd(0x188)](){const _0x1c67bb=_0x38b1fd;return this[_0x1c67bb(0x160)]?.[_0x1c67bb(0x193)]()?.[_0x1c67bb(0x173)]||'';}[_0x38b1fd(0x196)](_0x2b6478){const _0x3936fc=_0x38b1fd;this[_0x3936fc(0x194)][_0x3936fc(0x196)](_0x2b6478);}[_0x38b1fd(0x122)](){const _0x29dfd7=_0x38b1fd;this[_0x29dfd7(0x194)][_0x29dfd7(0x122)]();}[_0x38b1fd(0x143)](_0x37b7d1){const _0xe777d=_0x38b1fd;this[_0xe777d(0x194)][_0xe777d(0x143)](_0x37b7d1);}[_0x38b1fd(0x12e)](_0x3fdcf1){const _0x14002e=_0x38b1fd;this[_0x14002e(0x194)][_0x14002e(0x12e)](_0x3fdcf1);}[_0x38b1fd(0x18e)](_0x3f050b,_0x50dc6c){const _0x5d275d=_0x38b1fd;this[_0x5d275d(0x194)][_0x5d275d(0x18e)](_0x3f050b,_0x50dc6c);}[_0x38b1fd(0x171)](_0x5e614b,_0x5bb7e3,_0x453d8d){const _0x273bd4=_0x38b1fd;return this[_0x273bd4(0x194)][_0x273bd4(0x171)](_0x5e614b,_0x5bb7e3,_0x453d8d);}[_0x38b1fd(0x178)](_0x567d77){const _0x4fb199=_0x38b1fd;this[_0x4fb199(0x194)][_0x4fb199(0x178)](_0x567d77);}[_0x38b1fd(0x189)](){const _0x2bd45c=_0x38b1fd;this[_0x2bd45c(0x134)][_0x2bd45c(0x189)]();}[_0x38b1fd(0x142)](){const _0x5e4680=_0x38b1fd;this[_0x5e4680(0x134)][_0x5e4680(0x142)]();}[_0x38b1fd(0x127)](){const _0x3dceae=_0x38b1fd;return this[_0x3dceae(0x194)][_0x3dceae(0x127)]();}[_0x38b1fd(0x18c)](){const _0x2255c9=_0x38b1fd;return this[_0x2255c9(0x194)][_0x2255c9(0x18c)]();}[_0x38b1fd(0x153)](){const _0x249a29=_0x38b1fd;return this[_0x249a29(0x194)][_0x249a29(0x153)]();}async[_0x38b1fd(0x17a)](_0x3f5be5){const _0x2aa840=_0x38b1fd;_0x3f5be5?!0x1===await this[_0x2aa840(0x14f)][_0x2aa840(0x18a)](_0x3f5be5)&&(_0x477542(_0x2aa840(0x16f),{'conversation':this,'model':_0x3f5be5}),_0x3f5be5=(await this[_0x2aa840(0x14f)][_0x2aa840(0x132)]())[0x0]):(_0x477542(_0x2aa840(0x166),{'conversation':this}),_0x3f5be5=(await this[_0x2aa840(0x14f)][_0x2aa840(0x132)]())[0x0]),_0x3f5be5['id']!==this[_0x2aa840(0x13f)]?.['id']&&(this[_0x2aa840(0x13f)]=_0x3f5be5,this[_0x2aa840(0x134)][_0x2aa840(0x163)](),this[_0x2aa840(0x190)](_0x2aa840(0x191),{'selectedModel':_0x3f5be5}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x5377d5=_0x132a;function _0x132a(_0x4455c4,_0x322114){var _0xc1e5f2=_0xc1e5();return _0x132a=function(_0x132a75,_0x2a074d){_0x132a75=_0x132a75-0xb4;var _0x353688=_0xc1e5f2[_0x132a75];return _0x353688;},_0x132a(_0x4455c4,_0x322114);}(function(_0x21d274,_0x508696){var _0x289628=_0x132a,_0x5b6291=_0x21d274();while(!![]){try{var _0x41826b=parseInt(_0x289628(0xc0))/0x1*(parseInt(_0x289628(0xb9))/0x2)+-parseInt(_0x289628(0xb6))/0x3*(parseInt(_0x289628(0xca))/0x4)+-parseInt(_0x289628(0xc4))/0x5*(parseInt(_0x289628(0xc2))/0x6)+-parseInt(_0x289628(0xbb))/0x7+parseInt(_0x289628(0xc1))/0x8*(parseInt(_0x289628(0xc8))/0x9)+parseInt(_0x289628(0xc7))/0xa+parseInt(_0x289628(0xcb))/0xb;if(_0x41826b===_0x508696)break;else _0x5b6291['push'](_0x5b6291['shift']());}catch(_0x5bf710){_0x5b6291['push'](_0x5b6291['shift']());}}}(_0xc1e5,0x3c0f4));import{AICapabilities as _0x3874e3}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x544bdb}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0xc1890f}from'./aichatcontext.js';export class AIChatInteraction extends _0x544bdb{[_0x5377d5(0xc3)];[_0x5377d5(0xc5)];[_0x5377d5(0xbe)]=new Map();[_0x5377d5(0xbc)];[_0x5377d5(0xb5)];constructor(_0x554c3b){var _0x5548ae=_0x5377d5;super(_0x554c3b),this[_0x5548ae(0xc5)]=_0x554c3b[_0x5548ae(0xc5)],this[_0x5548ae(0xbe)]=_0x554c3b[_0x5548ae(0xbe)],this[_0x5548ae(0xcc)]=_0x554c3b[_0x5548ae(0xcc)],this[_0x5548ae(0xc3)]=_0x554c3b[_0x5548ae(0xc3)],this[_0x5548ae(0xbc)]=_0x554c3b[_0x5548ae(0xbc)],this[_0x5548ae(0xb5)]=_0x554c3b[_0x5548ae(0xb5)];}async[_0x5377d5(0xbf)](){var _0x584b24=_0x5377d5;return this[_0x584b24(0xbd)][_0x584b24(0xb7)]({'message':this[_0x584b24(0xc3)],'conversationId':this[_0x584b24(0xc5)],'parts':_0xc1890f[_0x584b24(0xba)](this[_0x584b24(0xbe)]),'capabilities':_0x3874e3[_0x584b24(0xc6)](this[_0x584b24(0xcc)]),'model':this[_0x584b24(0xbc)],'quickActionData':this[_0x584b24(0xb5)]});}[_0x5377d5(0xb4)](){var _0x2da731=_0x5377d5;return this[_0x2da731(0xbe)][_0x2da731(0xb8)](_0x2da731(0xc9));}}function _0xc1e5(){var _0x4196ba=['2202067ybNqgs','model','connector','contextItems','sendRequest','3RJyplZ','96rLDrRN','124692PPnVpC','userMessage','40GXZGSt','conversationId','getCapabilitiesRequestData','1368230LSkOJX','40104sXLDRb','current-document','7604IvULYw','2859516XFeYOZ','capabilities','getDocumentContext','quickActionData','15cdJniZ','queryAssistant','get','190730OuhfNN','mapContextItemsToRequestData'];_0xc1e5=function(){return _0x4196ba;};return _0xc1e5();}
23
+ var _0x48a82f=_0x3132;(function(_0x5d8630,_0x55440c){var _0x362806=_0x3132,_0x175ced=_0x5d8630();while(!![]){try{var _0x57afc0=parseInt(_0x362806(0x1f4))/0x1+-parseInt(_0x362806(0x204))/0x2+parseInt(_0x362806(0x1f5))/0x3+parseInt(_0x362806(0x1fc))/0x4*(parseInt(_0x362806(0x203))/0x5)+parseInt(_0x362806(0x1ff))/0x6*(parseInt(_0x362806(0x200))/0x7)+parseInt(_0x362806(0x1f7))/0x8*(parseInt(_0x362806(0x207))/0x9)+-parseInt(_0x362806(0x1fe))/0xa;if(_0x57afc0===_0x55440c)break;else _0x175ced['push'](_0x175ced['shift']());}catch(_0x231371){_0x175ced['push'](_0x175ced['shift']());}}}(_0x58e1,0xb3e04));function _0x58e1(){var _0x4454ca=['785kRgisv','2801818FjQDKU','current-document','getDocumentContext','12328092LqKRaw','userMessage','quickActionData','contextItems','connector','1278997PlHDkc','3816063TxBPnG','capabilities','8DnlTXc','sendRequest','getCapabilitiesRequestData','get','queryAssistant','18832VCcwtw','model','33856470vGLRBe','62412OmFAEg','581MWFWov','conversationId','mapContextItemsToRequestData'];_0x58e1=function(){return _0x4454ca;};return _0x58e1();}function _0x3132(_0x458dc7,_0x4c3f0a){var _0x58e174=_0x58e1();return _0x3132=function(_0x313227,_0xeab68c){_0x313227=_0x313227-0x1f4;var _0x4b2614=_0x58e174[_0x313227];return _0x4b2614;},_0x3132(_0x458dc7,_0x4c3f0a);}import{AICapabilities as _0x4c81ea}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x560663}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x3a8db0}from'./aichatcontext.js';export class AIChatInteraction extends _0x560663{[_0x48a82f(0x208)];[_0x48a82f(0x201)];[_0x48a82f(0x20a)]=new Map();[_0x48a82f(0x1fd)];[_0x48a82f(0x209)];constructor(_0x327a72){var _0x472a6e=_0x48a82f;super(_0x327a72),this[_0x472a6e(0x201)]=_0x327a72[_0x472a6e(0x201)],this[_0x472a6e(0x20a)]=_0x327a72[_0x472a6e(0x20a)],this[_0x472a6e(0x1f6)]=_0x327a72[_0x472a6e(0x1f6)],this[_0x472a6e(0x208)]=_0x327a72[_0x472a6e(0x208)],this[_0x472a6e(0x1fd)]=_0x327a72[_0x472a6e(0x1fd)],this[_0x472a6e(0x209)]=_0x327a72[_0x472a6e(0x209)];}async[_0x48a82f(0x1f8)](){var _0x229e1a=_0x48a82f;return this[_0x229e1a(0x20b)][_0x229e1a(0x1fb)]({'message':this[_0x229e1a(0x208)],'conversationId':this[_0x229e1a(0x201)],'parts':_0x3a8db0[_0x229e1a(0x202)](this[_0x229e1a(0x20a)]),'capabilities':_0x4c81ea[_0x229e1a(0x1f9)](this[_0x229e1a(0x1f6)]),'model':this[_0x229e1a(0x1fd)],'quickActionData':this[_0x229e1a(0x209)]});}[_0x48a82f(0x206)](){var _0x339d5d=_0x48a82f;return this[_0x339d5d(0x20a)][_0x339d5d(0x1fa)](_0x339d5d(0x205));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x3064(){const _0x165d4d=['4150180OgSFGw','4673050lpzipG','filter','length','6HhlzTy','getAll','capabilities','8852825aHCrjC','values','sort','14dCQWBo','1705983jrzYGq','1600773VYNkdA','enabled','6GoLJpI','6931784omTscW','18XbOACb','30043629Bgeksn'];_0x3064=function(){return _0x165d4d;};return _0x3064();}const _0x3fe011=_0x5ea6;(function(_0x3dec84,_0x24ba14){const _0x2d7a15=_0x5ea6,_0x5dca60=_0x3dec84();while(!![]){try{const _0x18bff6=parseInt(_0x2d7a15(0x85))/0x1+-parseInt(_0x2d7a15(0x88))/0x2*(parseInt(_0x2d7a15(0x86))/0x3)+-parseInt(_0x2d7a15(0x8c))/0x4+parseInt(_0x2d7a15(0x93))/0x5*(parseInt(_0x2d7a15(0x90))/0x6)+-parseInt(_0x2d7a15(0x84))/0x7*(parseInt(_0x2d7a15(0x89))/0x8)+parseInt(_0x2d7a15(0x8a))/0x9*(-parseInt(_0x2d7a15(0x8d))/0xa)+parseInt(_0x2d7a15(0x8b))/0xb;if(_0x18bff6===_0x24ba14)break;else _0x5dca60['push'](_0x5dca60['shift']());}catch(_0x2c2e20){_0x5dca60['push'](_0x5dca60['shift']());}}}(_0x3064,0xdc319));function _0x5ea6(_0x233bb8,_0x29d26e){const _0x3064fd=_0x3064();return _0x5ea6=function(_0x5ea633,_0x3862e5){_0x5ea633=_0x5ea633-0x83;let _0x29500b=_0x3064fd[_0x5ea633];return _0x29500b;},_0x5ea6(_0x233bb8,_0x29d26e);}import{AIModels as _0x53a3d1}from'../../aicore/model/aimodels.js';export class AIChatModels extends _0x53a3d1{async[_0x3fe011(0x91)](){const _0x3797e3=_0x3fe011;return(await super[_0x3797e3(0x91)]())[_0x3797e3(0x83)]((_0x6917f4,_0x26b26f)=>{const _0x3a0de6=_0x3797e3,_0x242e86=Object[_0x3a0de6(0x94)](_0x6917f4[_0x3a0de6(0x92)])[_0x3a0de6(0x8e)](_0x898e46=>_0x898e46[_0x3a0de6(0x87)])[_0x3a0de6(0x8f)];return Object[_0x3a0de6(0x94)](_0x26b26f[_0x3a0de6(0x92)])[_0x3a0de6(0x8e)](_0xd99ef1=>_0xd99ef1[_0x3a0de6(0x87)])[_0x3a0de6(0x8f)]-_0x242e86;});}}
23
+ const _0x421d5c=_0x2a63;function _0x1e2a(){const _0x4f021f=['591195LARMla','2359aswFeJ','6980CaTJHc','enabled','11946dAakjz','filter','6273NoVVkB','373584wURnPF','4MhJGxP','1930930Bfptrr','sort','capabilities','2300125MdFtOd','length','values','3620656LKEXXu','getAll'];_0x1e2a=function(){return _0x4f021f;};return _0x1e2a();}(function(_0x3848a7,_0x51209c){const _0x4fb2ec=_0x2a63,_0x2a597a=_0x3848a7();while(!![]){try{const _0x33a918=-parseInt(_0x4fb2ec(0x172))/0x1+parseInt(_0x4fb2ec(0x174))/0x2+parseInt(_0x4fb2ec(0x16b))/0x3*(-parseInt(_0x4fb2ec(0x173))/0x4)+-parseInt(_0x4fb2ec(0x166))/0x5+-parseInt(_0x4fb2ec(0x16f))/0x6*(-parseInt(_0x4fb2ec(0x16c))/0x7)+-parseInt(_0x4fb2ec(0x169))/0x8+-parseInt(_0x4fb2ec(0x171))/0x9*(-parseInt(_0x4fb2ec(0x16d))/0xa);if(_0x33a918===_0x51209c)break;else _0x2a597a['push'](_0x2a597a['shift']());}catch(_0x24acfc){_0x2a597a['push'](_0x2a597a['shift']());}}}(_0x1e2a,0x9c2c2));function _0x2a63(_0x4e0605,_0x5d8b54){const _0x1e2a96=_0x1e2a();return _0x2a63=function(_0x2a6356,_0x579e32){_0x2a6356=_0x2a6356-0x166;let _0x593a31=_0x1e2a96[_0x2a6356];return _0x593a31;},_0x2a63(_0x4e0605,_0x5d8b54);}import{AIModels as _0x31d9c2}from'../../aicore/model/aimodels.js';export class AIChatModels extends _0x31d9c2{async[_0x421d5c(0x16a)](){const _0x2a4b20=_0x421d5c;return(await super[_0x2a4b20(0x16a)]())[_0x2a4b20(0x175)]((_0x53e545,_0x119afe)=>{const _0x58e714=_0x2a4b20,_0xc97cb7=Object[_0x58e714(0x168)](_0x53e545[_0x58e714(0x176)])[_0x58e714(0x170)](_0x48dc92=>_0x48dc92[_0x58e714(0x16e)])[_0x58e714(0x167)];return Object[_0x58e714(0x168)](_0x119afe[_0x58e714(0x176)])[_0x58e714(0x170)](_0x4c330a=>_0x4c330a[_0x58e714(0x16e)])[_0x58e714(0x167)]-_0xc97cb7;});}}