@ckeditor/ckeditor5-ai 47.6.1 → 47.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/LICENSE.md +0 -4
  2. package/build/ai.js +2 -1
  3. package/dist/index.js +5 -5
  4. package/dist/translations/af.js +1 -1
  5. package/dist/translations/af.umd.js +1 -1
  6. package/dist/translations/ar.js +1 -1
  7. package/dist/translations/ar.umd.js +1 -1
  8. package/dist/translations/ast.js +1 -1
  9. package/dist/translations/ast.umd.js +1 -1
  10. package/dist/translations/az.js +1 -1
  11. package/dist/translations/az.umd.js +1 -1
  12. package/dist/translations/be.js +1 -1
  13. package/dist/translations/be.umd.js +1 -1
  14. package/dist/translations/bg.js +1 -1
  15. package/dist/translations/bg.umd.js +1 -1
  16. package/dist/translations/bn.js +1 -1
  17. package/dist/translations/bn.umd.js +1 -1
  18. package/dist/translations/bs.js +1 -1
  19. package/dist/translations/bs.umd.js +1 -1
  20. package/dist/translations/ca.js +1 -1
  21. package/dist/translations/ca.umd.js +1 -1
  22. package/dist/translations/cs.js +1 -1
  23. package/dist/translations/cs.umd.js +1 -1
  24. package/dist/translations/da.js +1 -1
  25. package/dist/translations/da.umd.js +1 -1
  26. package/dist/translations/de-ch.js +1 -1
  27. package/dist/translations/de-ch.umd.js +1 -1
  28. package/dist/translations/de.js +1 -1
  29. package/dist/translations/de.umd.js +1 -1
  30. package/dist/translations/el.js +1 -1
  31. package/dist/translations/el.umd.js +1 -1
  32. package/dist/translations/en-au.js +1 -1
  33. package/dist/translations/en-au.umd.js +1 -1
  34. package/dist/translations/en-gb.js +1 -1
  35. package/dist/translations/en-gb.umd.js +1 -1
  36. package/dist/translations/en.js +1 -1
  37. package/dist/translations/en.umd.js +1 -1
  38. package/dist/translations/eo.js +1 -1
  39. package/dist/translations/eo.umd.js +1 -1
  40. package/dist/translations/es-co.js +1 -1
  41. package/dist/translations/es-co.umd.js +1 -1
  42. package/dist/translations/es.js +1 -1
  43. package/dist/translations/es.umd.js +1 -1
  44. package/dist/translations/et.js +1 -1
  45. package/dist/translations/et.umd.js +1 -1
  46. package/dist/translations/eu.js +1 -1
  47. package/dist/translations/eu.umd.js +1 -1
  48. package/dist/translations/fa.js +1 -1
  49. package/dist/translations/fa.umd.js +1 -1
  50. package/dist/translations/fi.js +1 -1
  51. package/dist/translations/fi.umd.js +1 -1
  52. package/dist/translations/fr.js +1 -1
  53. package/dist/translations/fr.umd.js +1 -1
  54. package/dist/translations/gl.js +1 -1
  55. package/dist/translations/gl.umd.js +1 -1
  56. package/dist/translations/gu.js +1 -1
  57. package/dist/translations/gu.umd.js +1 -1
  58. package/dist/translations/he.js +1 -1
  59. package/dist/translations/he.umd.js +1 -1
  60. package/dist/translations/hi.js +1 -1
  61. package/dist/translations/hi.umd.js +1 -1
  62. package/dist/translations/hr.js +1 -1
  63. package/dist/translations/hr.umd.js +1 -1
  64. package/dist/translations/hu.js +1 -1
  65. package/dist/translations/hu.umd.js +1 -1
  66. package/dist/translations/hy.js +1 -1
  67. package/dist/translations/hy.umd.js +1 -1
  68. package/dist/translations/id.js +1 -1
  69. package/dist/translations/id.umd.js +1 -1
  70. package/dist/translations/it.js +1 -1
  71. package/dist/translations/it.umd.js +1 -1
  72. package/dist/translations/ja.js +1 -1
  73. package/dist/translations/ja.umd.js +1 -1
  74. package/dist/translations/jv.js +1 -1
  75. package/dist/translations/jv.umd.js +1 -1
  76. package/dist/translations/kk.js +1 -1
  77. package/dist/translations/kk.umd.js +1 -1
  78. package/dist/translations/km.js +1 -1
  79. package/dist/translations/km.umd.js +1 -1
  80. package/dist/translations/kn.js +1 -1
  81. package/dist/translations/kn.umd.js +1 -1
  82. package/dist/translations/ko.js +1 -1
  83. package/dist/translations/ko.umd.js +1 -1
  84. package/dist/translations/ku.js +1 -1
  85. package/dist/translations/ku.umd.js +1 -1
  86. package/dist/translations/lt.js +1 -1
  87. package/dist/translations/lt.umd.js +1 -1
  88. package/dist/translations/lv.js +1 -1
  89. package/dist/translations/lv.umd.js +1 -1
  90. package/dist/translations/ms.js +1 -1
  91. package/dist/translations/ms.umd.js +1 -1
  92. package/dist/translations/nb.js +1 -1
  93. package/dist/translations/nb.umd.js +1 -1
  94. package/dist/translations/ne.js +1 -1
  95. package/dist/translations/ne.umd.js +1 -1
  96. package/dist/translations/nl.js +1 -1
  97. package/dist/translations/nl.umd.js +1 -1
  98. package/dist/translations/no.js +1 -1
  99. package/dist/translations/no.umd.js +1 -1
  100. package/dist/translations/oc.js +1 -1
  101. package/dist/translations/oc.umd.js +1 -1
  102. package/dist/translations/pl.js +1 -1
  103. package/dist/translations/pl.umd.js +1 -1
  104. package/dist/translations/pt-br.js +1 -1
  105. package/dist/translations/pt-br.umd.js +1 -1
  106. package/dist/translations/pt.js +1 -1
  107. package/dist/translations/pt.umd.js +1 -1
  108. package/dist/translations/ro.js +1 -1
  109. package/dist/translations/ro.umd.js +1 -1
  110. package/dist/translations/ru.js +1 -1
  111. package/dist/translations/ru.umd.js +1 -1
  112. package/dist/translations/si.js +1 -1
  113. package/dist/translations/si.umd.js +1 -1
  114. package/dist/translations/sk.js +1 -1
  115. package/dist/translations/sk.umd.js +1 -1
  116. package/dist/translations/sl.js +1 -1
  117. package/dist/translations/sl.umd.js +1 -1
  118. package/dist/translations/sq.js +1 -1
  119. package/dist/translations/sq.umd.js +1 -1
  120. package/dist/translations/sr-latn.js +1 -1
  121. package/dist/translations/sr-latn.umd.js +1 -1
  122. package/dist/translations/sr.js +1 -1
  123. package/dist/translations/sr.umd.js +1 -1
  124. package/dist/translations/sv.js +1 -1
  125. package/dist/translations/sv.umd.js +1 -1
  126. package/dist/translations/th.js +1 -1
  127. package/dist/translations/th.umd.js +1 -1
  128. package/dist/translations/ti.js +1 -1
  129. package/dist/translations/ti.umd.js +1 -1
  130. package/dist/translations/tk.js +1 -1
  131. package/dist/translations/tk.umd.js +1 -1
  132. package/dist/translations/tr.js +1 -1
  133. package/dist/translations/tr.umd.js +1 -1
  134. package/dist/translations/tt.js +1 -1
  135. package/dist/translations/tt.umd.js +1 -1
  136. package/dist/translations/ug.js +1 -1
  137. package/dist/translations/ug.umd.js +1 -1
  138. package/dist/translations/uk.js +1 -1
  139. package/dist/translations/uk.umd.js +1 -1
  140. package/dist/translations/ur.js +1 -1
  141. package/dist/translations/ur.umd.js +1 -1
  142. package/dist/translations/uz.js +1 -1
  143. package/dist/translations/uz.umd.js +1 -1
  144. package/dist/translations/vi.js +1 -1
  145. package/dist/translations/vi.umd.js +1 -1
  146. package/dist/translations/zh-cn.js +1 -1
  147. package/dist/translations/zh-cn.umd.js +1 -1
  148. package/dist/translations/zh.js +1 -1
  149. package/dist/translations/zh.umd.js +1 -1
  150. package/lang/contexts.json +1 -0
  151. package/package.json +15 -16
  152. package/src/aiactions/aiactions.js +1 -1
  153. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  154. package/src/aiactions/model/aiactionsreply.js +1 -1
  155. package/src/aiassistant/adapters/aiadapter.js +1 -1
  156. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  157. package/src/aiassistant/adapters/awstextadapter.d.ts +15 -156
  158. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  159. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  160. package/src/aiassistant/aiassistant.d.ts +2 -0
  161. package/src/aiassistant/aiassistant.js +1 -1
  162. package/src/aiassistant/aiassistantediting.js +1 -1
  163. package/src/aiassistant/aiassistantui.js +1 -1
  164. package/src/aiassistant/legacyerrors.js +1 -1
  165. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  166. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  167. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  168. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  169. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  170. package/src/aiassistant/ui/form/aiformview.js +1 -1
  171. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  172. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  173. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  174. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  175. package/src/aiassistant/utils/common-translations.js +1 -1
  176. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  177. package/src/aiballoon/aiballoon.js +1 -1
  178. package/src/aiballoon/ui/aiballoonview.js +1 -1
  179. package/src/aichat/aichat.js +1 -1
  180. package/src/aichat/aichatballoon.js +1 -1
  181. package/src/aichat/aichatcontroller.js +1 -1
  182. package/src/aichat/aichatui.js +1 -1
  183. package/src/aichat/model/aichatcontext.js +1 -1
  184. package/src/aichat/model/aichatconversation.js +1 -1
  185. package/src/aichat/model/aichatinteraction.js +1 -1
  186. package/src/aichat/ui/aichatballoonview.js +1 -1
  187. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  188. package/src/aichat/ui/aichatfeedview.js +1 -1
  189. package/src/aichat/ui/aichatheaderview.js +1 -1
  190. package/src/aichat/ui/aichatview.js +1 -1
  191. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  192. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  193. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  194. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  195. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  196. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  197. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  198. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
  200. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  201. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  202. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  203. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  204. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  205. package/src/aichat/ui/feed/aichatfeedcustomelementview.js +1 -1
  206. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  207. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  208. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  209. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  210. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  211. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  212. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  213. package/src/aichat/utils/eventnames.js +1 -1
  214. package/src/aichat/utils/promisequeue.js +1 -1
  215. package/src/aichathistory/aichathistory.js +1 -1
  216. package/src/aichathistory/aichathistorycontroller.js +1 -1
  217. package/src/aichathistory/aichathistoryui.js +1 -1
  218. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  219. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  220. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  221. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  222. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  223. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  224. package/src/aichatshortcuts/aichatshortcuts.js +1 -1
  225. package/src/aichatshortcuts/ui/aichatshortcutsview.js +1 -1
  226. package/src/aichatshortcuts/ui/aichatshortcutview.js +1 -1
  227. package/src/aicore/aiconnector.js +1 -1
  228. package/src/aicore/aiediting.js +1 -1
  229. package/src/aicore/model/aicapabilities.js +1 -1
  230. package/src/aicore/model/aicontext.js +1 -1
  231. package/src/aicore/model/aiinteraction.js +1 -1
  232. package/src/aicore/model/aimodels.js +1 -1
  233. package/src/aicore/model/aireply.js +1 -1
  234. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  235. package/src/aicore/pipeline/airesponseparser.js +2 -2
  236. package/src/aicore/ui/aidisclaimerview.js +1 -1
  237. package/src/aicore/ui/aiskeleton.js +1 -1
  238. package/src/aicore/ui/aispinner.js +1 -1
  239. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  240. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  241. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  242. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.js +1 -1
  243. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +1 -1
  244. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +1 -1
  245. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  246. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  247. package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +1 -1
  248. package/src/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js +1 -1
  249. package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +1 -1
  250. package/src/aicore/utils/common-translations.js +1 -1
  251. package/src/aicore/utils/createresizebutton.js +1 -1
  252. package/src/aicore/utils/documentposition.js +1 -1
  253. package/src/aicore/utils/documentrange.js +1 -1
  254. package/src/aicore/utils/eventnames.js +1 -1
  255. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  256. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  257. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  258. package/src/aicore/utils/htmlparser.js +1 -1
  259. package/src/aicore/utils/htmlstreamer.js +1 -1
  260. package/src/aicore/utils/scrollmanager.js +1 -1
  261. package/src/aieditorintegration/aieditorintegration.js +1 -1
  262. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  263. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  264. package/src/aiquickactions/aiquickactions.js +1 -1
  265. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  266. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  267. package/src/aiquickactions/aiquickactionsui.js +1 -1
  268. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  269. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  270. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  271. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  272. package/src/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.js +1 -1
  273. package/src/aiquickactions/ui/balloon/aiactionsballoontoolbarview.js +1 -1
  274. package/src/aiquickactions/ui/balloon/aiactionsballoonview.js +1 -1
  275. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  276. package/src/aireviewcore/aireviewcorecontroller.js +1 -1
  277. package/src/aireviewcore/aireviewcoreediting.js +1 -1
  278. package/src/aireviewcore/aireviewcoreui.js +1 -1
  279. package/src/aireviewcore/model/aireviewcheck.js +1 -1
  280. package/src/aireviewcore/model/aireviewchecklist.js +1 -1
  281. package/src/aireviewcore/model/aireviewcheckresult.js +1 -1
  282. package/src/aireviewcore/model/aireviewcheckresultchange.js +1 -1
  283. package/src/aireviewcore/model/aireviewcheckrun.js +1 -1
  284. package/src/aireviewcore/model/aireviewsystemcheckrun.js +1 -1
  285. package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +1 -1
  286. package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +1 -1
  287. package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +1 -1
  288. package/src/aireviewcore/ui/aireviewcorefinishreviewbuttonview.js +1 -1
  289. package/src/aireviewcore/ui/aireviewcoregeneralerrorview.js +1 -1
  290. package/src/aireviewcore/ui/aireviewcorepromptinputview.js +1 -1
  291. package/src/aireviewcore/ui/aireviewcorereviewchecklistview.js +1 -1
  292. package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +1 -1
  293. package/src/aireviewcore/ui/aireviewcorereviewcompletedview.js +1 -1
  294. package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +1 -1
  295. package/src/aireviewcore/ui/aireviewcoreview.js +1 -1
  296. package/src/aireviewcore/ui/form/aireviewcoreformdropdown.js +1 -1
  297. package/src/aireviewcore/ui/form/aireviewcoreformmanager.js +1 -1
  298. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  299. package/src/aireviewmode/aireviewmode.js +1 -1
  300. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  301. package/src/aireviewmode/aireviewmodeui.js +1 -1
  302. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  303. package/src/aireviewmode/model/aireviewcheckextra.js +1 -1
  304. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  305. package/src/aireviewmode/model/aireviewextracheckrun.js +1 -1
  306. package/src/aireviewmode/model/aireviewmodechecklist.js +1 -1
  307. package/src/aitabs/aitabs.js +1 -1
  308. package/src/aitabs/aitabsmainview.js +1 -1
  309. package/src/aitabs/tabs/aitabsview.js +1 -1
  310. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  311. package/src/aitabs/tabs/tabpanelview.js +1 -1
  312. package/src/aitranslate/aitranslate.js +1 -1
  313. package/src/aitranslate/aitranslatecontroller.js +1 -1
  314. package/src/aitranslate/aitranslateui.js +1 -1
  315. package/src/aitranslate/model/aitranslatecheck.js +1 -1
  316. package/src/aitranslate/model/aitranslatechecklist.js +1 -1
  317. package/src/aitranslate/model/aitranslatecheckrun.js +1 -1
  318. package/src/aitranslate/ui/aitranslatechecklistview.js +1 -1
  319. package/src/aitranslate/ui/aitranslatecheckresultsview.js +1 -1
  320. package/src/errors.js +1 -1
  321. package/src/errorsmap.js +1 -1
  322. package/src/index.js +1 -1
  323. package/build/966.ai.js +0 -5
  324. package/build/translations/en.js +0 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4b8d0e=_0x2ae9;(function(_0x3cb24f,_0x8bd20a){const _0x4aeb7d=_0x2ae9,_0x1a95d=_0x3cb24f();while(!![]){try{const _0x154e41=parseInt(_0x4aeb7d(0x1f4))/0x1+-parseInt(_0x4aeb7d(0x1d0))/0x2+-parseInt(_0x4aeb7d(0x252))/0x3*(parseInt(_0x4aeb7d(0x1c0))/0x4)+parseInt(_0x4aeb7d(0x231))/0x5*(-parseInt(_0x4aeb7d(0x256))/0x6)+parseInt(_0x4aeb7d(0x24d))/0x7+parseInt(_0x4aeb7d(0x245))/0x8+parseInt(_0x4aeb7d(0x244))/0x9*(parseInt(_0x4aeb7d(0x23c))/0xa);if(_0x154e41===_0x8bd20a)break;else _0x1a95d['push'](_0x1a95d['shift']());}catch(_0x1b4cba){_0x1a95d['push'](_0x1a95d['shift']());}}}(_0x3128,0xb8669));import{ContextPlugin as _0x257589}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x2ec60e}from'ckeditor5/src/utils.js';import{AIChatView as _0x1c009d}from'./ui/aichatview.js';function _0x2ae9(_0x5ecc10,_0x4b577a){const _0x312863=_0x3128();return _0x2ae9=function(_0x2ae9df,_0x33e581){_0x2ae9df=_0x2ae9df-0x1aa;let _0x584781=_0x312863[_0x2ae9df];return _0x584781;},_0x2ae9(_0x5ecc10,_0x4b577a);}function _0x3128(){const _0x4d08fa=['set','disableControls','capabilities','find','enableControls','isOfficialPlugin','finishInteraction','updateSuggestionItem','abort','clearPendingContextUI','_promiseQueue','5eahwtY','setSelectedModel','isWebSearchEnabled','displayedPrompt','AI_CHAT_WELCOME_MESSAGE','AITabs','setModelList','addFeedItemAIReply','removeContextItem','showDiff','createConversation','642650UzavHj','updateCapabilities','setReasoning','error-message','user-message','isModelAvailable','ai.models.showModelSelector','addFeedInteractionHeader','315TriQoR','1034352UYBcnc','interactionId','stopAutoScroll','addTab','conversationCreated','from','resetMessageInput','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','1750287MYOJlG','AIChatUI','_animateConversationTitle','disableModelSelector','markFeedItemAsDone','7485aNjuKN','addFeedItemAISuggestion','updateFeedInteractionHeader','prepareLoadingMessage','7058322ovMnfd','length','forEach','setFeedItemRenderingStrategy','custom-element','populateSourceResourceBalloon','isDone','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','chatHeader','removeFeedInteraction','updateFeedItemAIReplySuggestionContent','requires','isDisabled','removeFeedItem','renderingStrategy','TrackChanges','view','attributes','_getInputPlaceholder','<p>','ai.chat.welcomeMessage','insertSuggestion','_titleAnimationInterval','getItemIds','setIsMaximized','isMaximized','has','fire','value','1424vGJAuQ','scrollFeedToSuggestion','clear','startAutoScroll','focusPromptInput','enableModelSelector','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','showResizeButton','setPromptInputValue','setConversationContext','_view','hasItem','conversation-start','setInputPlaceholder','feedItemRenderingStrategy','removeItem','1676506JKNdtM','_isTrackChangesCommandValueBound','addContextItem','contextItems','closeSourceResourceBalloon','setContextItemLoading','addItem','options','clearConversationContextUI','</p>','delegate','chatControls','isPremiumPlugin','addFeedItemError','setIsUploadInProgress','pluginName','chat','filter','ai-reply','get','addFeedItemStaticMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','queueEmptyPromise','markItemAsDone','isBusy','remove','interaction-header','plugins','label','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','resetConversationTitle','setLoadingMessage','clearLoadingMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','trackChanges','children','1029555QfPpKq','last','isPending','ai.availableReplyActions','destroy','hasFeedItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','ai-suggestion-reply','availableModels','updateFeedItemAIReplyContent','then','updateFeedItemAIReplySuggestionPartState','stopInteraction','streaming','updateResourceState','setConversationTitle','startsWith','setSuggestionPartActive','scrollToSuggestion','setWebSearch','setAddContextOptions','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','isTrackChangesOn','_interactionPromiseResolver','toggleLoadingSkeleton','AI_CHAT_HEADING','updateFeedItemAIReplySources','enqueue','values','addFeedItemUserMessage','setFeedItemAIReplySuggestionPartActive','context','toggleSuggestionDisplayMode','isReasoningEnabled','areActionsDisabled','ai.chat.context.searchInputVisibleFrom','setModel','isVisible','config','commands','updateWebSources','updateReplyItem','userMessage','isLoading','chatFeed','startInteraction','updateSuggestionPartState','addFeedItemCustomElement','locale','bind'];_0x3128=function(){return _0x4d08fa;};return _0x3128();}import{AITabs as _0x571281}from'../aitabs/aitabs.js';import{getTranslation as _0x1e499c}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x51b551}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0xdd15a5}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x1b679b}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x259c61}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x16cdc4}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x3a212b}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x257589{static get[_0x4b8d0e(0x1ae)](){return[_0x571281];}[_0x4b8d0e(0x1ca)];static get[_0x4b8d0e(0x1df)](){const _0x32a3a1=_0x4b8d0e;return _0x32a3a1(0x24e);}static get[_0x4b8d0e(0x22b)](){return!0x0;}static get[_0x4b8d0e(0x1dc)](){return!0x0;}[_0x4b8d0e(0x1ce)]=_0x4b8d0e(0x201);[_0x4b8d0e(0x23a)]=!0x0;[_0x4b8d0e(0x230)];[_0x4b8d0e(0x20b)];[_0x4b8d0e(0x1b9)]=void 0x0;[_0x4b8d0e(0x1d1)]=!0x1;constructor(_0x4f429d){const _0x49cf6c=_0x4b8d0e;super(_0x4f429d);const _0x53eaff=this[_0x49cf6c(0x213)][_0x49cf6c(0x1eb)][_0x49cf6c(0x1e3)](_0x49cf6c(0x236));this[_0x49cf6c(0x226)](_0x49cf6c(0x1e8),!0x1),this[_0x49cf6c(0x230)]=new _0x1b679b(),this[_0x49cf6c(0x1ca)]=new _0x1c009d(this[_0x49cf6c(0x213)][_0x49cf6c(0x224)],{'showResizeButton':_0x53eaff[_0x49cf6c(0x1c7)],'contextResourcesSearchInputVisibleFrom':this[_0x49cf6c(0x213)][_0x49cf6c(0x21a)][_0x49cf6c(0x1e3)](_0x49cf6c(0x217))}),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1da)](..._0x259c61)['to'](this),this[_0x49cf6c(0x1ca)]['on'](_0x49cf6c(0x214),(_0x545ffa,{showDiff:_0x4bd23f})=>{const _0x547b89=_0x49cf6c;this[_0x547b89(0x23a)]=_0x4bd23f;}),_0x53eaff[_0x49cf6c(0x1b3)][_0x49cf6c(0x248)]({'id':_0x49cf6c(0x1e0),'buttonLabel':_0x1e499c(this[_0x49cf6c(0x213)][_0x49cf6c(0x224)],_0x49cf6c(0x20d)),'buttonIcon':_0x51b551,'order':0x0,'content':this[_0x49cf6c(0x1ca)]}),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)][_0x49cf6c(0x225)](_0x49cf6c(0x21f))['to'](this,_0x49cf6c(0x1e8),_0x5d2a5a=>_0x5d2a5a),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x220)][_0x49cf6c(0x225)](_0x49cf6c(0x1f6))['to'](this,_0x49cf6c(0x1e8),_0x35525a=>_0x35525a),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)][_0x49cf6c(0x1cd)](this[_0x49cf6c(0x1b5)]()),this[_0x49cf6c(0x225)](_0x49cf6c(0x241))['to'](this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)],_0x49cf6c(0x241));}[_0x4b8d0e(0x1f8)](){const _0x29ac61=_0x4b8d0e;super[_0x29ac61(0x1f8)](),this[_0x29ac61(0x1b9)]&&clearInterval(this[_0x29ac61(0x1b9)]);}[_0x4b8d0e(0x23b)](_0x26a2ab){const _0x124174=_0x4b8d0e,_0x1aabd4=this[_0x124174(0x213)][_0x124174(0x21a)][_0x124174(0x1e3)](_0x124174(0x1b7))??_0x1e499c(this[_0x124174(0x213)][_0x124174(0x224)],_0x124174(0x235));this[_0x124174(0x1ca)][_0x124174(0x220)][_0x124174(0x1c2)](),this[_0x124174(0x1ca)][_0x124174(0x1db)][_0x124174(0x1c5)](),this[_0x124174(0x1ca)][_0x124174(0x1db)][_0x124174(0x237)](_0x26a2ab[_0x124174(0x1fc)],!this[_0x124174(0x213)][_0x124174(0x21a)][_0x124174(0x1e3)](_0x124174(0x242))),this[_0x124174(0x1e4)]({'id':_0x124174(0x1cc),'staticMessage':_0x1aabd4}),this[_0x124174(0x1be)](_0x124174(0x249));}[_0x4b8d0e(0x1e4)]({id:_0x530cec,staticMessage:_0x420523}){const _0x2ab45d=_0x4b8d0e;this[_0x2ab45d(0x1ca)][_0x2ab45d(0x220)][_0x2ab45d(0x1d6)](_0x2ab45d(0x1e2),{'id':_0x530cec,'initialContent':_0x2ab45d(0x1b6)+_0x420523+_0x2ab45d(0x1d9)});}[_0x4b8d0e(0x211)](_0x19aeb9){const _0x90b99=_0x4b8d0e,_0x445b88=_0x19aeb9[_0x90b99(0x1b4)]?.[_0x90b99(0x234)]||_0x19aeb9[_0x90b99(0x21e)];this[_0x90b99(0x1ca)][_0x90b99(0x220)][_0x90b99(0x1d6)](_0x90b99(0x240),{'contextItems':Array[_0x90b99(0x24a)](_0x19aeb9[_0x90b99(0x1d3)][_0x90b99(0x210)]()),'initialContent':_0x90b99(0x1b6)+_0x445b88+_0x90b99(0x1d9),'id':_0x19aeb9['id']});}[_0x4b8d0e(0x1dd)]({errorMessage:_0x207677,id:_0x15a642}){const _0x5b9bc6=_0x4b8d0e;this[_0x5b9bc6(0x1ca)][_0x5b9bc6(0x220)][_0x5b9bc6(0x1d6)](_0x5b9bc6(0x23f),{'initialContent':_0x5b9bc6(0x1b6)+_0x207677+_0x5b9bc6(0x1d9),'id':_0x15a642});}[_0x4b8d0e(0x238)](_0x3bd849){const _0x3c8f47=_0x4b8d0e;return this[_0x3c8f47(0x230)][_0x3c8f47(0x20f)](async()=>{const _0x4b846e=_0x3c8f47;this[_0x4b846e(0x1ca)][_0x4b846e(0x220)][_0x4b846e(0x1d6)](_0x4b846e(0x1e2),{'id':_0x3bd849[_0x4b846e(0x246)]+':'+_0x3bd849['id']}),this[_0x4b846e(0x1f0)]();});}async[_0x4b8d0e(0x253)](_0x6d43f2){const _0x29e74b=_0x4b8d0e,_0x47bf44=_0x16cdc4(this[_0x29e74b(0x213)]);let _0x25f5da=_0x47bf44[_0x29e74b(0x21a)][_0x29e74b(0x1e3)](_0x29e74b(0x1f7))||[..._0x3a212b];if(_0x47bf44[_0x29e74b(0x1eb)][_0x29e74b(0x1bd)](_0x29e74b(0x1b2))){if(!this[_0x29e74b(0x1d1)]){this[_0x29e74b(0x1d1)]=!0x0;const _0x22aae5=_0x47bf44[_0x29e74b(0x21b)][_0x29e74b(0x1e3)](_0x29e74b(0x1f2));this[_0x29e74b(0x1ca)][_0x29e74b(0x220)][_0x29e74b(0x225)](_0x29e74b(0x20a))['to'](_0x22aae5,_0x29e74b(0x1bf));}}else _0x25f5da=_0x25f5da[_0x29e74b(0x1e1)](_0x46a944=>_0x29e74b(0x1b8)!=_0x46a944);return this[_0x29e74b(0x230)][_0x29e74b(0x20f)](async()=>{const _0x5cad94=_0x29e74b;this[_0x5cad94(0x1ca)][_0x5cad94(0x220)][_0x5cad94(0x1d6)](_0x5cad94(0x1fb),{'id':_0x6d43f2[_0x5cad94(0x246)]+':'+_0x6d43f2['id'],'areActionsDisabled':_0x6d43f2[_0x5cad94(0x216)],'showDiff':this[_0x5cad94(0x23a)],'availableActions':_0x25f5da}),this[_0x5cad94(0x1f0)]();});}[_0x4b8d0e(0x243)](_0x541e10,_0x484587){const _0xd8d50b=_0x4b8d0e,_0x3020bb=this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1f3)][_0xd8d50b(0x1f5)];if(_0x3020bb instanceof _0xdd15a5)return this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1f3)][_0xd8d50b(0x1e9)](_0x3020bb),void this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1d6)](_0xd8d50b(0x1ea),{'id':_0x541e10['id'],'capabilities':{'isWebSearchEnabled':_0x3020bb[_0xd8d50b(0x228)][_0xd8d50b(0x233)]||_0x484587[_0xd8d50b(0x233)],'isReasoningEnabled':_0x3020bb[_0xd8d50b(0x228)][_0xd8d50b(0x215)]||_0x484587[_0xd8d50b(0x215)]}});this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1d6)](_0xd8d50b(0x1ea),{'id':_0x541e10['id'],'capabilities':_0x484587});}async[_0x4b8d0e(0x223)](_0x3d8bb8,_0x21cca3){const _0x26a2dd=_0x4b8d0e;let _0x371c7a;return await this[_0x26a2dd(0x230)][_0x26a2dd(0x20f)](async()=>{const _0x15ca84=_0x26a2dd;_0x371c7a=this[_0x15ca84(0x1ca)][_0x15ca84(0x220)][_0x15ca84(0x1d6)](_0x15ca84(0x25a),{'content':_0x3d8bb8,'id':_0x21cca3});}),_0x371c7a;}[_0x4b8d0e(0x1b0)](_0x553891){const _0x260a43=_0x4b8d0e;this[_0x260a43(0x1ca)][_0x260a43(0x220)][_0x260a43(0x1cf)](_0x553891);}[_0x4b8d0e(0x1f9)](_0x4e4362){const _0x19c009=_0x4b8d0e;return this[_0x19c009(0x1ca)][_0x19c009(0x220)][_0x19c009(0x1cb)](_0x4e4362);}[_0x4b8d0e(0x254)](_0x28ff0a){const _0x383a40=_0x4b8d0e,_0x46758d=this[_0x383a40(0x1ca)][_0x383a40(0x220)][_0x383a40(0x1f3)][_0x383a40(0x229)](_0x45efc0=>_0x45efc0[_0x383a40(0x1d7)]['id']==_0x28ff0a['id']&&_0x45efc0 instanceof _0xdd15a5);_0x46758d&&_0x46758d[_0x383a40(0x226)](_0x383a40(0x219),_0x28ff0a[_0x383a40(0x219)]);}async[_0x4b8d0e(0x1fd)](_0x3421bb){const _0x3c0fb9=_0x4b8d0e,_0x230880=_0x3421bb[_0x3c0fb9(0x1b1)]||this[_0x3c0fb9(0x1ce)];return this[_0x3c0fb9(0x230)][_0x3c0fb9(0x20f)](async _0xc3c62=>{const _0x19bea6=_0x3c0fb9;await this[_0x19bea6(0x1ca)][_0x19bea6(0x220)][_0x19bea6(0x21d)]({..._0x3421bb,'abortSignal':_0xc3c62,'renderingStrategy':_0x230880}),_0x3421bb[_0x19bea6(0x25c)]&&this[_0x19bea6(0x251)](_0x3421bb['id']);});}[_0x4b8d0e(0x20e)](_0x2ec758,_0x576b66){const _0x1ab056=_0x4b8d0e;this[_0x1ab056(0x1ca)][_0x1ab056(0x220)][_0x1ab056(0x21c)](_0x2ec758,_0x576b66);}async[_0x4b8d0e(0x1ad)](_0xa5a820){const _0x3740b0=_0x4b8d0e,_0x168d5e=_0xa5a820[_0x3740b0(0x1b1)]||this[_0x3740b0(0x1ce)];return this[_0x3740b0(0x230)][_0x3740b0(0x20f)](async _0x1e238f=>{const _0x19811e=_0x3740b0;await this[_0x19811e(0x1ca)][_0x19811e(0x220)][_0x19811e(0x22d)]({..._0xa5a820,'abortSignal':_0x1e238f,'renderingStrategy':_0x168d5e}),_0xa5a820[_0x19811e(0x25c)]&&this[_0x19811e(0x251)](_0xa5a820['id']);});}[_0x4b8d0e(0x1ff)](_0x281aa6){const _0x1d17e6=_0x4b8d0e;this[_0x1d17e6(0x1ca)][_0x1d17e6(0x220)][_0x1d17e6(0x222)](_0x281aa6);}[_0x4b8d0e(0x212)](_0x358e4e){const _0x59abbb=_0x4b8d0e;this[_0x59abbb(0x1ca)][_0x59abbb(0x220)][_0x59abbb(0x205)](_0x358e4e);}[_0x4b8d0e(0x251)](_0x4f5442){const _0x3eae04=_0x4b8d0e;this[_0x3eae04(0x1ca)][_0x3eae04(0x220)][_0x3eae04(0x1e7)](_0x4f5442);}[_0x4b8d0e(0x1ac)](_0x7c8b57){const _0xc1c6ae=_0x4b8d0e;this[_0xc1c6ae(0x1ca)][_0xc1c6ae(0x220)][_0xc1c6ae(0x1ba)]()[_0xc1c6ae(0x1e1)](_0x13a621=>_0x13a621[_0xc1c6ae(0x204)](_0x7c8b57))[_0xc1c6ae(0x258)](_0x466095=>this[_0xc1c6ae(0x1ca)][_0xc1c6ae(0x220)][_0xc1c6ae(0x1cf)](_0x466095));}[_0x4b8d0e(0x221)](){const _0x580e3a=_0x4b8d0e,_0x3dcf80=this[_0x580e3a(0x255)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x580e3a(0x1ef)](_0x3dcf80),this[_0x580e3a(0x1ca)][_0x580e3a(0x1db)][_0x580e3a(0x250)](!this[_0x580e3a(0x213)][_0x580e3a(0x21a)][_0x580e3a(0x1e3)](_0x580e3a(0x242))),this[_0x580e3a(0x1e8)]=!0x0,this[_0x580e3a(0x1ca)][_0x580e3a(0x220)][_0x580e3a(0x1c3)]();}[_0x4b8d0e(0x200)](_0x177714){const _0x1ae527=_0x4b8d0e;this[_0x1ae527(0x230)][_0x1ae527(0x22e)](),this[_0x1ae527(0x1ca)][_0x1ae527(0x220)][_0x1ae527(0x1ba)]()[_0x1ae527(0x1e1)](_0x3adaa9=>_0x3adaa9[_0x1ae527(0x204)](_0x177714['id']))[_0x1ae527(0x258)](_0x366f7a=>this[_0x1ae527(0x251)](_0x366f7a)),this[_0x1ae527(0x1e8)]=!0x1,this[_0x1ae527(0x1ca)][_0x1ae527(0x220)][_0x1ae527(0x247)]();}async[_0x4b8d0e(0x22c)](){const _0x3b0597=_0x4b8d0e;return this[_0x3b0597(0x230)][_0x3b0597(0x1e6)][_0x3b0597(0x1fe)](()=>{const _0x5adad5=_0x3b0597;this[_0x5adad5(0x1e8)]=!0x1,this[_0x5adad5(0x1ca)][_0x5adad5(0x220)][_0x5adad5(0x247)]();});}[_0x4b8d0e(0x1d2)](_0x12fe76,_0x33d8a4){const _0x2bce2a=_0x4b8d0e;this[_0x2bce2a(0x1ca)][_0x2bce2a(0x1db)][_0x2bce2a(0x1d2)](_0x12fe76,_0x33d8a4);}[_0x4b8d0e(0x239)](_0xc91bf6){const _0x13dfbb=_0x4b8d0e;this[_0x13dfbb(0x1ca)][_0x13dfbb(0x1db)][_0x13dfbb(0x239)](_0xc91bf6);}[_0x4b8d0e(0x1d5)](_0x33dbab,_0x33759e){const _0x4d5bea=_0x4b8d0e;this[_0x4d5bea(0x1ca)][_0x4d5bea(0x1db)][_0x4d5bea(0x1d5)](_0x33dbab,_0x33759e);}[_0x4b8d0e(0x1de)](_0x25d0b4){const _0x29df50=_0x4b8d0e;this[_0x29df50(0x1ca)][_0x29df50(0x1db)][_0x29df50(0x1de)](_0x25d0b4);}[_0x4b8d0e(0x1c9)](_0x143998){const _0x18d695=_0x4b8d0e;this[_0x18d695(0x1ca)][_0x18d695(0x1db)][_0x18d695(0x1c9)](_0x143998);}[_0x4b8d0e(0x22f)](){const _0x21bc19=_0x4b8d0e;this[_0x21bc19(0x1ca)][_0x21bc19(0x1db)][_0x21bc19(0x22f)]();}[_0x4b8d0e(0x1d8)](){const _0x49c82b=_0x4b8d0e;this[_0x49c82b(0x1ca)][_0x49c82b(0x1db)][_0x49c82b(0x1d8)]();}[_0x4b8d0e(0x202)](_0x5e212f,_0x5a52af,_0x401449){const _0x3f24b8=_0x4b8d0e;this[_0x3f24b8(0x1ca)][_0x3f24b8(0x1db)][_0x3f24b8(0x202)](_0x5e212f,_0x5a52af,_0x401449);}[_0x4b8d0e(0x24b)](){const _0x478ed5=_0x4b8d0e;this[_0x478ed5(0x1ca)][_0x478ed5(0x1db)][_0x478ed5(0x24b)](),this[_0x478ed5(0x1ca)][_0x478ed5(0x1db)][_0x478ed5(0x1cd)](this[_0x478ed5(0x1b5)]());}[_0x4b8d0e(0x208)](_0x3c9058){const _0xd60797=_0x4b8d0e;this[_0xd60797(0x1ca)][_0xd60797(0x1db)][_0xd60797(0x208)](_0x3c9058);}[_0x4b8d0e(0x23d)](_0x3aca51){const _0x27dd63=_0x4b8d0e;this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x207)](_0x3aca51[_0x27dd63(0x233)]),this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x23e)](_0x3aca51[_0x27dd63(0x215)]),this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x1cd)](this[_0x27dd63(0x1b5)](_0x3aca51));}[_0x4b8d0e(0x232)](_0x117f6c,_0x4c19b9){const _0xe374ff=_0x4b8d0e;this[_0xe374ff(0x1ca)][_0xe374ff(0x1db)][_0xe374ff(0x218)](_0x117f6c),_0x4c19b9&&this[_0xe374ff(0x1ca)][_0xe374ff(0x1db)][_0xe374ff(0x250)](!0x1);}[_0x4b8d0e(0x259)](_0x6200bc){const _0xab12c8=_0x4b8d0e;this[_0xab12c8(0x1ce)]=_0x6200bc;}[_0x4b8d0e(0x20c)](_0x253181){const _0xa46919=_0x4b8d0e;this[_0xa46919(0x1ca)][_0xa46919(0x220)][_0xa46919(0x20c)](_0x253181);}[_0x4b8d0e(0x1ee)](){const _0x2fac73=_0x4b8d0e;this[_0x2fac73(0x203)](_0x1e499c(this[_0x2fac73(0x213)][_0x2fac73(0x224)],_0x2fac73(0x20d)));}[_0x4b8d0e(0x203)](_0x4ef57e,_0x12ab01=!0x1){const _0x52f247=_0x4b8d0e;if(_0x12ab01&&!_0x2ec60e()&&_0x4ef57e[_0x52f247(0x257)])return this[_0x52f247(0x1ca)][_0x52f247(0x1ab)][_0x52f247(0x1ec)]='',void this[_0x52f247(0x24f)](_0x4ef57e);this[_0x52f247(0x1ca)][_0x52f247(0x1ab)][_0x52f247(0x1ec)]=_0x4ef57e;}[_0x4b8d0e(0x1ef)](_0x15a567){const _0x2d2586=_0x4b8d0e;this[_0x2d2586(0x1ca)][_0x2d2586(0x220)][_0x2d2586(0x1ef)](_0x15a567);}[_0x4b8d0e(0x1f0)](){const _0x517e07=_0x4b8d0e;this[_0x517e07(0x1ca)][_0x517e07(0x220)][_0x517e07(0x1ef)]('');}[_0x4b8d0e(0x24f)](_0x5031b7){const _0x3fd8c7=_0x4b8d0e;let _0x30915d=0x0;clearInterval(this[_0x3fd8c7(0x1b9)]),this[_0x3fd8c7(0x1b9)]=setInterval(()=>{const _0x4df098=_0x3fd8c7;this[_0x4df098(0x1ca)][_0x4df098(0x1ab)][_0x4df098(0x1ec)]=this[_0x4df098(0x1ca)][_0x4df098(0x1ab)][_0x4df098(0x1ec)]+_0x5031b7[_0x30915d],_0x30915d++,_0x30915d===_0x5031b7[_0x4df098(0x257)]&&clearInterval(this[_0x4df098(0x1b9)]);},0x1e);}[_0x4b8d0e(0x1bb)](_0x134846){const _0xc4e580=_0x4b8d0e;this[_0xc4e580(0x1ca)][_0xc4e580(0x1ab)][_0xc4e580(0x1bc)]=_0x134846;}[_0x4b8d0e(0x255)](_0x28f787){const _0x4752d3=_0x4b8d0e;return _0x28f787[_0x4752d3(0x233)]&&_0x28f787[_0x4752d3(0x215)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1aa)):_0x28f787[_0x4752d3(0x233)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1c6)):_0x28f787[_0x4752d3(0x215)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x24c)):_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1ed));}[_0x4b8d0e(0x1b5)](_0x1d3ef2){const _0x295164=_0x4b8d0e;return _0x1d3ef2?_0x1d3ef2[_0x295164(0x233)]&&_0x1d3ef2[_0x295164(0x215)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x209)):_0x1d3ef2[_0x295164(0x233)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1e5)):_0x1d3ef2[_0x295164(0x215)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1f1)):_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1fa)):_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1fa));}[_0x4b8d0e(0x25b)](_0x48d89b,_0x13d7b9,_0x115f82,_0x50f88b){const _0x36cedb=_0x4b8d0e;this[_0x36cedb(0x1ca)][_0x36cedb(0x25b)](_0x48d89b,_0x13d7b9,_0x115f82,_0x50f88b);}[_0x4b8d0e(0x1d4)](_0x11acfd){const _0x1ba230=_0x4b8d0e;this[_0x1ba230(0x1ca)][_0x1ba230(0x1d4)](_0x11acfd);}[_0x4b8d0e(0x1c8)](_0x310f85){const _0x376e59=_0x4b8d0e;this[_0x376e59(0x1ca)][_0x376e59(0x1db)][_0x376e59(0x1c8)](_0x310f85);}[_0x4b8d0e(0x1c4)](_0xb9b35c=!0x1){const _0x19164e=_0x4b8d0e;this[_0x19164e(0x1ca)][_0x19164e(0x1db)][_0x19164e(0x1c4)](_0xb9b35c);}[_0x4b8d0e(0x1c1)](_0x203636,_0x894655){const _0x1cd549=_0x4b8d0e;this[_0x1cd549(0x1ca)][_0x1cd549(0x220)][_0x1cd549(0x206)](_0x203636,_0x894655);}[_0x4b8d0e(0x1c3)](){const _0xc344df=_0x4b8d0e;this[_0xc344df(0x1ca)][_0xc344df(0x220)][_0xc344df(0x1c3)]();}[_0x4b8d0e(0x227)](){const _0x186f00=_0x4b8d0e;this[_0x186f00(0x1ca)][_0x186f00(0x1db)][_0x186f00(0x1af)]=!0x0;}[_0x4b8d0e(0x22a)](){const _0x1eeb8d=_0x4b8d0e;this[_0x1eeb8d(0x1ca)][_0x1eeb8d(0x1db)][_0x1eeb8d(0x1af)]=!0x1;}}
23
+ const _0x1991b4=_0x2d92;(function(_0x34eb97,_0x43575e){const _0x3098da=_0x2d92,_0x1d0c5e=_0x34eb97();while(!![]){try{const _0x57a2b2=parseInt(_0x3098da(0x1a5))/0x1+-parseInt(_0x3098da(0x1c9))/0x2*(-parseInt(_0x3098da(0x20e))/0x3)+parseInt(_0x3098da(0x227))/0x4+-parseInt(_0x3098da(0x1d0))/0x5*(-parseInt(_0x3098da(0x1c3))/0x6)+-parseInt(_0x3098da(0x1da))/0x7*(parseInt(_0x3098da(0x1b0))/0x8)+parseInt(_0x3098da(0x1f7))/0x9+parseInt(_0x3098da(0x1fd))/0xa*(-parseInt(_0x3098da(0x1e9))/0xb);if(_0x57a2b2===_0x43575e)break;else _0x1d0c5e['push'](_0x1d0c5e['shift']());}catch(_0x38b666){_0x1d0c5e['push'](_0x1d0c5e['shift']());}}}(_0x30df,0x650c6));import{ContextPlugin as _0x415174}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x23ad55}from'ckeditor5/src/utils.js';import{AIChatView as _0x1367a0}from'./ui/aichatview.js';import{AITabs as _0xd3db3}from'../aitabs/aitabs.js';function _0x2d92(_0x2096bf,_0x12beb7){const _0x30df45=_0x30df();return _0x2d92=function(_0x2d92cf,_0xcc9804){_0x2d92cf=_0x2d92cf-0x176;let _0x98659e=_0x30df45[_0x2d92cf];return _0x98659e;},_0x2d92(_0x2096bf,_0x12beb7);}import{getTranslation as _0x23f727}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x355c86}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x1ffc5e}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x464f05}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x185abc}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x5f090e}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x22d29b}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';function _0x30df(){const _0x244404=['setConversationTitle','setIsUploadInProgress','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','677800EZgwtY','_titleAnimationInterval','setModelList','updateWebSources','prepareLoadingMessage','attributes','setSelectedModel','interaction-header','queueEmptyPromise','isDone','setFeedItemAIReplySuggestionPartActive','AIChatUI','setInputPlaceholder','value','bind','delegate','setModel','areActionsDisabled','requires','chatControls','ai.chat.welcomeMessage','view','setPromptInputValue','ai-suggestion-reply','chatFeed','getItemIds','capabilities','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','filter','label','renderingStrategy','set','startInteraction','ai.availableReplyActions','</p>','scrollToSuggestion','<p>','displayedPrompt','focusPromptInput','remove','enqueue','setIsMaximized','toggleSuggestionDisplayMode','startsWith','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','abort','showResizeButton','addFeedItemAISuggestion','removeFeedInteraction','updateCapabilities','221085DWLesT','isOfficialPlugin','addTab','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','setAddContextOptions','enableControls','interactionId','addFeedItemUserMessage','removeItem','destroy','closeSourceResourceBalloon','5442792AWTMzV','clearConversationContextUI','addFeedItemStaticMessage','chatHeader','isWebSearchEnabled','populateSourceResourceBalloon','error-message','streaming','AI_CHAT_WELCOME_MESSAGE','values','enableModelSelector','setSuggestionPartActive','markFeedItemAsDone','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','finishInteraction','setLoadingMessage','_getInputPlaceholder','addContextItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','66ZecSGc','pluginName','ai.chat.context.searchInputVisibleFrom','stopInteraction','updateFeedItemAIReplySuggestionContent','TrackChanges','15680TdJaYF','toggleLoadingSkeleton','conversation-start','createConversation','isMaximized','isPremiumPlugin','availableModels','1340fwGMxd','_interactionPromiseResolver','_animateConversationTitle','find','addFeedItemError','fire','options','resetConversationTitle','insertSuggestion','updateFeedItemAIReplySources','7eIyyOU','from','isDisabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','setFeedItemRenderingStrategy','userMessage','scrollFeedToSuggestion','hasItem','resetMessageInput','startAutoScroll','stopAutoScroll','setWebSearch','isPending','setContextItemLoading','55uEtZsB','clearLoadingMessage','trackChanges','markItemAsDone','has','isModelAvailable','chat','conversationCreated','removeFeedItem','user-message','context','setConversationContext','updateFeedInteractionHeader','length','6107985dxcTCW','locale','custom-element','disableControls','isReasoningEnabled','forEach','1570850MyRDgq','ai-reply','updateSuggestionItem','get','updateResourceState','clearPendingContextUI','hasFeedItem','commands','isTrackChangesOn','AI_CHAT_HEADING','_promiseQueue','_view','updateFeedItemAIReplySuggestionPartState','updateSuggestionPartState','addFeedInteractionHeader','setReasoning','clear','309KGdDzf','config','then','isLoading','_isTrackChangesCommandValueBound','addFeedItemAIReply','feedItemRenderingStrategy','isVisible','last','contextItems','addItem','updateReplyItem','children','removeContextItem','plugins','showDiff','updateFeedItemAIReplyContent','AITabs','isBusy','addFeedItemCustomElement','ai.models.showModelSelector','disableModelSelector'];_0x30df=function(){return _0x244404;};return _0x30df();}export class AIChatUI extends _0x415174{static get[_0x1991b4(0x185)](){return[_0xd3db3];}[_0x1991b4(0x208)];static get[_0x1991b4(0x1c4)](){const _0x4d9190=_0x1991b4;return _0x4d9190(0x17e);}static get[_0x1991b4(0x1a6)](){return!0x0;}static get[_0x1991b4(0x1ce)](){return!0x0;}[_0x1991b4(0x214)]=_0x1991b4(0x1b7);[_0x1991b4(0x21d)]=!0x0;[_0x1991b4(0x207)];[_0x1991b4(0x1d1)];[_0x1991b4(0x228)]=void 0x0;[_0x1991b4(0x212)]=!0x1;constructor(_0x80c29b){const _0x5a367e=_0x1991b4;super(_0x80c29b);const _0x2597c6=this[_0x5a367e(0x1f3)][_0x5a367e(0x21c)][_0x5a367e(0x200)](_0x5a367e(0x21f));this[_0x5a367e(0x192)](_0x5a367e(0x220),!0x1),this[_0x5a367e(0x207)]=new _0x464f05(),this[_0x5a367e(0x208)]=new _0x1367a0(this[_0x5a367e(0x1f3)][_0x5a367e(0x1f8)],{'showResizeButton':_0x2597c6[_0x5a367e(0x1a1)],'contextResourcesSearchInputVisibleFrom':this[_0x5a367e(0x1f3)][_0x5a367e(0x20f)][_0x5a367e(0x200)](_0x5a367e(0x1c5))}),this[_0x5a367e(0x208)][_0x5a367e(0x182)](..._0x185abc)['to'](this),this[_0x5a367e(0x208)]['on'](_0x5a367e(0x19d),(_0x5e265f,{showDiff:_0x4b41b6})=>{const _0x4a025c=_0x5a367e;this[_0x4a025c(0x21d)]=_0x4b41b6;}),_0x2597c6[_0x5a367e(0x188)][_0x5a367e(0x1a7)]({'id':_0x5a367e(0x1ef),'buttonLabel':_0x23f727(this[_0x5a367e(0x1f3)][_0x5a367e(0x1f8)],_0x5a367e(0x206)),'buttonIcon':_0x355c86,'order':0x0,'content':this[_0x5a367e(0x208)]}),this[_0x5a367e(0x208)][_0x5a367e(0x186)][_0x5a367e(0x181)](_0x5a367e(0x211))['to'](this,_0x5a367e(0x220),_0x2d4b3e=>_0x2d4b3e),this[_0x5a367e(0x208)][_0x5a367e(0x18b)][_0x5a367e(0x181)](_0x5a367e(0x1e7))['to'](this,_0x5a367e(0x220),_0x11b3e5=>_0x11b3e5),this[_0x5a367e(0x208)][_0x5a367e(0x186)][_0x5a367e(0x17f)](this[_0x5a367e(0x1c0)]()),this[_0x5a367e(0x181)](_0x5a367e(0x1ee))['to'](this[_0x5a367e(0x208)][_0x5a367e(0x186)],_0x5a367e(0x1ee));}[_0x1991b4(0x1ae)](){const _0x20ff53=_0x1991b4;super[_0x20ff53(0x1ae)](),this[_0x20ff53(0x228)]&&clearInterval(this[_0x20ff53(0x228)]);}[_0x1991b4(0x1cc)](_0x751f2){const _0x405a89=_0x1991b4,_0x1afac7=this[_0x405a89(0x1f3)][_0x405a89(0x20f)][_0x405a89(0x200)](_0x405a89(0x187))??_0x23f727(this[_0x405a89(0x1f3)][_0x405a89(0x1f8)],_0x405a89(0x1b8));this[_0x405a89(0x208)][_0x405a89(0x18b)][_0x405a89(0x20d)](),this[_0x405a89(0x208)][_0x405a89(0x186)][_0x405a89(0x1ba)](),this[_0x405a89(0x208)][_0x405a89(0x186)][_0x405a89(0x229)](_0x751f2[_0x405a89(0x1cf)],!this[_0x405a89(0x1f3)][_0x405a89(0x20f)][_0x405a89(0x200)](_0x405a89(0x222))),this[_0x405a89(0x1b2)]({'id':_0x405a89(0x1cb),'staticMessage':_0x1afac7}),this[_0x405a89(0x1d5)](_0x405a89(0x1f0));}[_0x1991b4(0x1b2)]({id:_0x8f2306,staticMessage:_0x1b1931}){const _0x443a87=_0x1991b4;this[_0x443a87(0x208)][_0x443a87(0x18b)][_0x443a87(0x218)](_0x443a87(0x1fe),{'id':_0x8f2306,'initialContent':_0x443a87(0x197)+_0x1b1931+_0x443a87(0x195)});}[_0x1991b4(0x1ac)](_0x5a60b2){const _0x19be5d=_0x1991b4,_0x58b3eb=_0x5a60b2[_0x19be5d(0x178)]?.[_0x19be5d(0x198)]||_0x5a60b2[_0x19be5d(0x1e0)];this[_0x19be5d(0x208)][_0x19be5d(0x18b)][_0x19be5d(0x218)](_0x19be5d(0x1f2),{'contextItems':Array[_0x19be5d(0x1db)](_0x5a60b2[_0x19be5d(0x217)][_0x19be5d(0x1b9)]()),'initialContent':_0x19be5d(0x197)+_0x58b3eb+_0x19be5d(0x195),'id':_0x5a60b2['id']});}[_0x1991b4(0x1d4)]({errorMessage:_0x334368,id:_0x4c84c3}){const _0x2dfde8=_0x1991b4;this[_0x2dfde8(0x208)][_0x2dfde8(0x18b)][_0x2dfde8(0x218)](_0x2dfde8(0x1b6),{'initialContent':_0x2dfde8(0x197)+_0x334368+_0x2dfde8(0x195),'id':_0x4c84c3});}[_0x1991b4(0x213)](_0x5eff94){const _0x321a11=_0x1991b4;return this[_0x321a11(0x207)][_0x321a11(0x19b)](async()=>{const _0x155371=_0x321a11;this[_0x155371(0x208)][_0x155371(0x18b)][_0x155371(0x218)](_0x155371(0x1fe),{'id':_0x5eff94[_0x155371(0x1ab)]+':'+_0x5eff94['id']}),this[_0x155371(0x1ea)]();});}async[_0x1991b4(0x1a2)](_0x5df796){const _0x4ff100=_0x1991b4,_0x51f732=_0x5f090e(this[_0x4ff100(0x1f3)]);let _0x31d47=_0x51f732[_0x4ff100(0x20f)][_0x4ff100(0x200)](_0x4ff100(0x194))||[..._0x22d29b];if(_0x51f732[_0x4ff100(0x21c)][_0x4ff100(0x1ed)](_0x4ff100(0x1c8))){if(!this[_0x4ff100(0x212)]){this[_0x4ff100(0x212)]=!0x0;const _0x99cee=_0x51f732[_0x4ff100(0x204)][_0x4ff100(0x200)](_0x4ff100(0x1eb));this[_0x4ff100(0x208)][_0x4ff100(0x18b)][_0x4ff100(0x181)](_0x4ff100(0x205))['to'](_0x99cee,_0x4ff100(0x180));}}else _0x31d47=_0x31d47[_0x4ff100(0x18f)](_0x321298=>_0x4ff100(0x1d8)!=_0x321298);return this[_0x4ff100(0x207)][_0x4ff100(0x19b)](async()=>{const _0x2a0d0c=_0x4ff100;this[_0x2a0d0c(0x208)][_0x2a0d0c(0x18b)][_0x2a0d0c(0x218)](_0x2a0d0c(0x18a),{'id':_0x5df796[_0x2a0d0c(0x1ab)]+':'+_0x5df796['id'],'areActionsDisabled':_0x5df796[_0x2a0d0c(0x184)],'showDiff':this[_0x2a0d0c(0x21d)],'availableActions':_0x31d47}),this[_0x2a0d0c(0x1ea)]();});}[_0x1991b4(0x20b)](_0x1891d7,_0xc1572d){const _0x121997=_0x1991b4,_0x2b0cf5=this[_0x121997(0x208)][_0x121997(0x18b)][_0x121997(0x21a)][_0x121997(0x216)];if(_0x2b0cf5 instanceof _0x1ffc5e)return this[_0x121997(0x208)][_0x121997(0x18b)][_0x121997(0x21a)][_0x121997(0x19a)](_0x2b0cf5),void this[_0x121997(0x208)][_0x121997(0x18b)][_0x121997(0x218)](_0x121997(0x17a),{'id':_0x1891d7['id'],'capabilities':{'isWebSearchEnabled':_0x2b0cf5[_0x121997(0x18d)][_0x121997(0x1b4)]||_0xc1572d[_0x121997(0x1b4)],'isReasoningEnabled':_0x2b0cf5[_0x121997(0x18d)][_0x121997(0x1fb)]||_0xc1572d[_0x121997(0x1fb)]}});this[_0x121997(0x208)][_0x121997(0x18b)][_0x121997(0x218)](_0x121997(0x17a),{'id':_0x1891d7['id'],'capabilities':_0xc1572d});}async[_0x1991b4(0x221)](_0x4891c6,_0x3a1350){const _0xe0dfc9=_0x1991b4;let _0x4c6238;return await this[_0xe0dfc9(0x207)][_0xe0dfc9(0x19b)](async()=>{const _0x1086e1=_0xe0dfc9;_0x4c6238=this[_0x1086e1(0x208)][_0x1086e1(0x18b)][_0x1086e1(0x218)](_0x1086e1(0x1f9),{'content':_0x4891c6,'id':_0x3a1350});}),_0x4c6238;}[_0x1991b4(0x1f1)](_0x1b29db){const _0x280938=_0x1991b4;this[_0x280938(0x208)][_0x280938(0x18b)][_0x280938(0x1ad)](_0x1b29db);}[_0x1991b4(0x203)](_0x53585f){const _0x28af9b=_0x1991b4;return this[_0x28af9b(0x208)][_0x28af9b(0x18b)][_0x28af9b(0x1e2)](_0x53585f);}[_0x1991b4(0x1f5)](_0x3ea978){const _0x38ffba=_0x1991b4,_0x33fec9=this[_0x38ffba(0x208)][_0x38ffba(0x18b)][_0x38ffba(0x21a)][_0x38ffba(0x1d3)](_0x4015af=>_0x4015af[_0x38ffba(0x1d6)]['id']==_0x3ea978['id']&&_0x4015af instanceof _0x1ffc5e);_0x33fec9&&_0x33fec9[_0x38ffba(0x192)](_0x38ffba(0x215),_0x3ea978[_0x38ffba(0x215)]);}async[_0x1991b4(0x21e)](_0x18020a){const _0x3294a4=_0x1991b4,_0x3538cd=_0x18020a[_0x3294a4(0x191)]||this[_0x3294a4(0x214)];return this[_0x3294a4(0x207)][_0x3294a4(0x19b)](async _0x4540fb=>{const _0x249687=_0x3294a4;await this[_0x249687(0x208)][_0x249687(0x18b)][_0x249687(0x219)]({..._0x18020a,'abortSignal':_0x4540fb,'renderingStrategy':_0x3538cd}),_0x18020a[_0x249687(0x17c)]&&this[_0x249687(0x1bc)](_0x18020a['id']);});}[_0x1991b4(0x1d9)](_0x4ceae6,_0x512e8e){const _0x44fddd=_0x1991b4;this[_0x44fddd(0x208)][_0x44fddd(0x18b)][_0x44fddd(0x176)](_0x4ceae6,_0x512e8e);}async[_0x1991b4(0x1c7)](_0x575403){const _0x105cf0=_0x1991b4,_0x3c1e0d=_0x575403[_0x105cf0(0x191)]||this[_0x105cf0(0x214)];return this[_0x105cf0(0x207)][_0x105cf0(0x19b)](async _0x12dd31=>{const _0x1f4017=_0x105cf0;await this[_0x1f4017(0x208)][_0x1f4017(0x18b)][_0x1f4017(0x1ff)]({..._0x575403,'abortSignal':_0x12dd31,'renderingStrategy':_0x3c1e0d}),_0x575403[_0x1f4017(0x17c)]&&this[_0x1f4017(0x1bc)](_0x575403['id']);});}[_0x1991b4(0x209)](_0x46838f){const _0x338ef6=_0x1991b4;this[_0x338ef6(0x208)][_0x338ef6(0x18b)][_0x338ef6(0x20a)](_0x46838f);}[_0x1991b4(0x17d)](_0x1bc443){const _0x271ccd=_0x1991b4;this[_0x271ccd(0x208)][_0x271ccd(0x18b)][_0x271ccd(0x1bb)](_0x1bc443);}[_0x1991b4(0x1bc)](_0x6c6b58){const _0x36de05=_0x1991b4;this[_0x36de05(0x208)][_0x36de05(0x18b)][_0x36de05(0x1ec)](_0x6c6b58);}[_0x1991b4(0x1a3)](_0x557eed){const _0x228473=_0x1991b4;this[_0x228473(0x208)][_0x228473(0x18b)][_0x228473(0x18c)]()[_0x228473(0x18f)](_0x2b5786=>_0x2b5786[_0x228473(0x19e)](_0x557eed))[_0x228473(0x1fc)](_0xfceef0=>this[_0x228473(0x208)][_0x228473(0x18b)][_0x228473(0x1ad)](_0xfceef0));}[_0x1991b4(0x193)](){const _0x12ee4d=_0x1991b4,_0x2cc579=this[_0x12ee4d(0x177)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x12ee4d(0x1bf)](_0x2cc579),this[_0x12ee4d(0x208)][_0x12ee4d(0x186)][_0x12ee4d(0x223)](!this[_0x12ee4d(0x1f3)][_0x12ee4d(0x20f)][_0x12ee4d(0x200)](_0x12ee4d(0x222))),this[_0x12ee4d(0x220)]=!0x0,this[_0x12ee4d(0x208)][_0x12ee4d(0x18b)][_0x12ee4d(0x1e4)]();}[_0x1991b4(0x1c6)](_0x3260f1){const _0x36623c=_0x1991b4;this[_0x36623c(0x207)][_0x36623c(0x1a0)](),this[_0x36623c(0x208)][_0x36623c(0x18b)][_0x36623c(0x18c)]()[_0x36623c(0x18f)](_0x28d3d2=>_0x28d3d2[_0x36623c(0x19e)](_0x3260f1['id']))[_0x36623c(0x1fc)](_0x158761=>this[_0x36623c(0x1bc)](_0x158761)),this[_0x36623c(0x220)]=!0x1,this[_0x36623c(0x208)][_0x36623c(0x18b)][_0x36623c(0x1e5)]();}async[_0x1991b4(0x1be)](){const _0x5d95af=_0x1991b4;return this[_0x5d95af(0x207)][_0x5d95af(0x17b)][_0x5d95af(0x210)](()=>{const _0x47f5c6=_0x5d95af;this[_0x47f5c6(0x220)]=!0x1,this[_0x47f5c6(0x208)][_0x47f5c6(0x18b)][_0x47f5c6(0x1e5)]();});}[_0x1991b4(0x1c1)](_0x58dc11,_0x36b9de){const _0x25abac=_0x1991b4;this[_0x25abac(0x208)][_0x25abac(0x186)][_0x25abac(0x1c1)](_0x58dc11,_0x36b9de);}[_0x1991b4(0x21b)](_0x3f9fb9){const _0x17e497=_0x1991b4;this[_0x17e497(0x208)][_0x17e497(0x186)][_0x17e497(0x21b)](_0x3f9fb9);}[_0x1991b4(0x1e8)](_0x572ee1,_0x5152d3){const _0x37d5e8=_0x1991b4;this[_0x37d5e8(0x208)][_0x37d5e8(0x186)][_0x37d5e8(0x1e8)](_0x572ee1,_0x5152d3);}[_0x1991b4(0x225)](_0x3724b7){const _0x2fb22c=_0x1991b4;this[_0x2fb22c(0x208)][_0x2fb22c(0x186)][_0x2fb22c(0x225)](_0x3724b7);}[_0x1991b4(0x1f4)](_0x49a9de){const _0x2748f2=_0x1991b4;this[_0x2748f2(0x208)][_0x2748f2(0x186)][_0x2748f2(0x1f4)](_0x49a9de);}[_0x1991b4(0x202)](){const _0x3c5e63=_0x1991b4;this[_0x3c5e63(0x208)][_0x3c5e63(0x186)][_0x3c5e63(0x202)]();}[_0x1991b4(0x1b1)](){const _0x2eb296=_0x1991b4;this[_0x2eb296(0x208)][_0x2eb296(0x186)][_0x2eb296(0x1b1)]();}[_0x1991b4(0x201)](_0x13e1de,_0x396778,_0x2cbc96){const _0x48b2f3=_0x1991b4;this[_0x48b2f3(0x208)][_0x48b2f3(0x186)][_0x48b2f3(0x201)](_0x13e1de,_0x396778,_0x2cbc96);}[_0x1991b4(0x1e3)](){const _0x45b55c=_0x1991b4;this[_0x45b55c(0x208)][_0x45b55c(0x186)][_0x45b55c(0x1e3)](),this[_0x45b55c(0x208)][_0x45b55c(0x186)][_0x45b55c(0x17f)](this[_0x45b55c(0x1c0)]());}[_0x1991b4(0x1a9)](_0x3bd381){const _0x520c04=_0x1991b4;this[_0x520c04(0x208)][_0x520c04(0x186)][_0x520c04(0x1a9)](_0x3bd381);}[_0x1991b4(0x1a4)](_0xd2f85c){const _0x48dcc0=_0x1991b4;this[_0x48dcc0(0x208)][_0x48dcc0(0x186)][_0x48dcc0(0x1e6)](_0xd2f85c[_0x48dcc0(0x1b4)]),this[_0x48dcc0(0x208)][_0x48dcc0(0x186)][_0x48dcc0(0x20c)](_0xd2f85c[_0x48dcc0(0x1fb)]),this[_0x48dcc0(0x208)][_0x48dcc0(0x186)][_0x48dcc0(0x17f)](this[_0x48dcc0(0x1c0)](_0xd2f85c));}[_0x1991b4(0x179)](_0x41c5db,_0x18ba88){const _0x5e4d8d=_0x1991b4;this[_0x5e4d8d(0x208)][_0x5e4d8d(0x186)][_0x5e4d8d(0x183)](_0x41c5db),_0x18ba88&&this[_0x5e4d8d(0x208)][_0x5e4d8d(0x186)][_0x5e4d8d(0x223)](!0x1);}[_0x1991b4(0x1df)](_0xa57f41){const _0x255fc9=_0x1991b4;this[_0x255fc9(0x214)]=_0xa57f41;}[_0x1991b4(0x1ca)](_0x3efed0){const _0x135311=_0x1991b4;this[_0x135311(0x208)][_0x135311(0x18b)][_0x135311(0x1ca)](_0x3efed0);}[_0x1991b4(0x1d7)](){const _0x423b8f=_0x1991b4;this[_0x423b8f(0x224)](_0x23f727(this[_0x423b8f(0x1f3)][_0x423b8f(0x1f8)],_0x423b8f(0x206)));}[_0x1991b4(0x224)](_0x35dd17,_0x22fd74=!0x1){const _0x45b3d1=_0x1991b4;if(_0x22fd74&&!_0x23ad55()&&_0x35dd17[_0x45b3d1(0x1f6)])return this[_0x45b3d1(0x208)][_0x45b3d1(0x1b3)][_0x45b3d1(0x190)]='',void this[_0x45b3d1(0x1d2)](_0x35dd17);this[_0x45b3d1(0x208)][_0x45b3d1(0x1b3)][_0x45b3d1(0x190)]=_0x35dd17;}[_0x1991b4(0x1bf)](_0x1f80d6){const _0x589ec4=_0x1991b4;this[_0x589ec4(0x208)][_0x589ec4(0x18b)][_0x589ec4(0x1bf)](_0x1f80d6);}[_0x1991b4(0x1ea)](){const _0x1d9059=_0x1991b4;this[_0x1d9059(0x208)][_0x1d9059(0x18b)][_0x1d9059(0x1bf)]('');}[_0x1991b4(0x1d2)](_0x10ca18){const _0x25c417=_0x1991b4;let _0x4cfa5c=0x0;clearInterval(this[_0x25c417(0x228)]),this[_0x25c417(0x228)]=setInterval(()=>{const _0x26090a=_0x25c417;this[_0x26090a(0x208)][_0x26090a(0x1b3)][_0x26090a(0x190)]=this[_0x26090a(0x208)][_0x26090a(0x1b3)][_0x26090a(0x190)]+_0x10ca18[_0x4cfa5c],_0x4cfa5c++,_0x4cfa5c===_0x10ca18[_0x26090a(0x1f6)]&&clearInterval(this[_0x26090a(0x228)]);},0x1e);}[_0x1991b4(0x19c)](_0x44c3d8){const _0x112ea1=_0x1991b4;this[_0x112ea1(0x208)][_0x112ea1(0x1b3)][_0x112ea1(0x1cd)]=_0x44c3d8;}[_0x1991b4(0x177)](_0x2e32b3){const _0x12f3be=_0x1991b4;return _0x2e32b3[_0x12f3be(0x1b4)]&&_0x2e32b3[_0x12f3be(0x1fb)]?_0x23f727(this[_0x12f3be(0x1f3)][_0x12f3be(0x1f8)],_0x12f3be(0x1a8)):_0x2e32b3[_0x12f3be(0x1b4)]?_0x23f727(this[_0x12f3be(0x1f3)][_0x12f3be(0x1f8)],_0x12f3be(0x1de)):_0x2e32b3[_0x12f3be(0x1fb)]?_0x23f727(this[_0x12f3be(0x1f3)][_0x12f3be(0x1f8)],_0x12f3be(0x1bd)):_0x23f727(this[_0x12f3be(0x1f3)][_0x12f3be(0x1f8)],_0x12f3be(0x19f));}[_0x1991b4(0x1c0)](_0x4fbd93){const _0x5da173=_0x1991b4;return _0x4fbd93?_0x4fbd93[_0x5da173(0x1b4)]&&_0x4fbd93[_0x5da173(0x1fb)]?_0x23f727(this[_0x5da173(0x1f3)][_0x5da173(0x1f8)],_0x5da173(0x1c2)):_0x4fbd93[_0x5da173(0x1b4)]?_0x23f727(this[_0x5da173(0x1f3)][_0x5da173(0x1f8)],_0x5da173(0x1dd)):_0x4fbd93[_0x5da173(0x1fb)]?_0x23f727(this[_0x5da173(0x1f3)][_0x5da173(0x1f8)],_0x5da173(0x226)):_0x23f727(this[_0x5da173(0x1f3)][_0x5da173(0x1f8)],_0x5da173(0x18e)):_0x23f727(this[_0x5da173(0x1f3)][_0x5da173(0x1f8)],_0x5da173(0x18e));}[_0x1991b4(0x1b5)](_0x372509,_0x15d9c0,_0x2c6972,_0x49cac0){const _0x3d2d35=_0x1991b4;this[_0x3d2d35(0x208)][_0x3d2d35(0x1b5)](_0x372509,_0x15d9c0,_0x2c6972,_0x49cac0);}[_0x1991b4(0x1af)](_0x1bdfe3){const _0x82cafd=_0x1991b4;this[_0x82cafd(0x208)][_0x82cafd(0x1af)](_0x1bdfe3);}[_0x1991b4(0x189)](_0x5c2ffe){const _0x27a81d=_0x1991b4;this[_0x27a81d(0x208)][_0x27a81d(0x186)][_0x27a81d(0x189)](_0x5c2ffe);}[_0x1991b4(0x199)](_0x4485e5=!0x1){const _0x1f2bcb=_0x1991b4;this[_0x1f2bcb(0x208)][_0x1f2bcb(0x186)][_0x1f2bcb(0x199)](_0x4485e5);}[_0x1991b4(0x1e1)](_0x6334b,_0x30d881){const _0x2ccc2f=_0x1991b4;this[_0x2ccc2f(0x208)][_0x2ccc2f(0x18b)][_0x2ccc2f(0x196)](_0x6334b,_0x30d881);}[_0x1991b4(0x1e4)](){const _0x25ece0=_0x1991b4;this[_0x25ece0(0x208)][_0x25ece0(0x18b)][_0x25ece0(0x1e4)]();}[_0x1991b4(0x1fa)](){const _0x12d34b=_0x1991b4;this[_0x12d34b(0x208)][_0x12d34b(0x186)][_0x12d34b(0x1dc)]=!0x0;}[_0x1991b4(0x1aa)](){const _0x114da1=_0x1991b4;this[_0x114da1(0x208)][_0x114da1(0x186)][_0x114da1(0x1dc)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x215be7=_0x5d84;(function(_0x55152e,_0x3626c1){const _0x4b0b5c=_0x5d84,_0x3f2707=_0x55152e();while(!![]){try{const _0x48f1d5=parseInt(_0x4b0b5c(0x185))/0x1+parseInt(_0x4b0b5c(0x13b))/0x2+-parseInt(_0x4b0b5c(0x158))/0x3+parseInt(_0x4b0b5c(0x13c))/0x4+-parseInt(_0x4b0b5c(0x16c))/0x5+parseInt(_0x4b0b5c(0x1b0))/0x6*(-parseInt(_0x4b0b5c(0x135))/0x7)+parseInt(_0x4b0b5c(0x1a1))/0x8*(parseInt(_0x4b0b5c(0x176))/0x9);if(_0x48f1d5===_0x3626c1)break;else _0x3f2707['push'](_0x3f2707['shift']());}catch(_0x563be1){_0x3f2707['push'](_0x3f2707['shift']());}}}(_0x4d43,0x3064b));import{CKEditorError as _0x492d6f,ObservableMixin as _0x9c9d99,uid as _0x2913a4}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x5672ff,AIContextTextResourceType as _0x5144de}from'../../aicore/model/aicontext.js';import{escape as _0x59bada}from'es-toolkit/compat';import{errorsMap as _0x2fea76}from'../../errorsmap.js';function _0x5d84(_0x48850e,_0x5ab4b7){const _0x4d430d=_0x4d43();return _0x5d84=function(_0x5d8486,_0x33cf54){_0x5d8486=_0x5d8486-0x130;let _0x1b8698=_0x4d430d[_0x5d8486];return _0x1b8698;},_0x5d84(_0x48850e,_0x5ab4b7);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x215be7(0x190),_0x215be7(0x181),_0x215be7(0x196),_0x215be7(0x1a0),_0x215be7(0x18f),_0x215be7(0x1a5),_0x215be7(0x16e),_0x215be7(0x157),_0x215be7(0x13f)];export class AIChatContext extends _0x9c9d99(){[_0x215be7(0x19d)];[_0x215be7(0x1b6)];[_0x215be7(0x17e)];constructor({connector:_0x3bebdf,config:_0x457cec,ownerId:_0x103131}){const _0x24c69c=_0x215be7;super(),this[_0x24c69c(0x19d)]=_0x3bebdf,this[_0x24c69c(0x1b6)]=_0x457cec,this[_0x24c69c(0x17e)]=_0x103131;}[_0x215be7(0x188)](){const _0x35506d=_0x215be7;this[_0x35506d(0x1bb)]=new Map(),this[_0x35506d(0x18d)]=new Map(),this[_0x35506d(0x191)]=new Map(),this[_0x35506d(0x133)]=new Map(),this[_0x35506d(0x159)]();}[_0x215be7(0x144)](){const _0x2e96fc=_0x215be7;return this[_0x2e96fc(0x1bb)];}async[_0x215be7(0x1a6)](_0x312a95){const _0x123ad7=_0x215be7,_0x2a1bf5=await this[_0x123ad7(0x16a)](_0x312a95);return this[_0x123ad7(0x150)](_0x2a1bf5),_0x123ad7(0x1ba)===_0x2a1bf5[_0x123ad7(0x1a7)]&&this[_0x123ad7(0x178)](),_0x2a1bf5;}async[_0x215be7(0x16a)](_0x169e48){const _0x2909f6=_0x215be7;if(_0x169e48[_0x2909f6(0x1b3)]===_0x5672ff[_0x2909f6(0x138)]){const _0x1c1035=await this[_0x2909f6(0x19d)][_0x2909f6(0x1bf)](this[_0x2909f6(0x17e)],_0x169e48['id'])[_0x2909f6(0x199)]();return{'id':_0x2909f6(0x1ba),'uiId':_0x2909f6(0x1ba),'label':_0x2909f6(0x137),'type':_0x169e48[_0x2909f6(0x1b3)],'content':_0x1c1035[_0x2909f6(0x14a)],'hidden':this[_0x2909f6(0x18d)][_0x2909f6(0x179)](_0x2909f6(0x1ba)),'version':_0x1c1035[_0x2909f6(0x1b2)]?.[_0x2909f6(0x18a)],'sessionId':_0x1c1035[_0x2909f6(0x1b2)]?.[_0x2909f6(0x18e)]};}if(_0x169e48[_0x2909f6(0x1b3)]===_0x5672ff[_0x2909f6(0x166)])return{'id':_0x169e48['id'],'uiId':_0x169e48['id'],'label':_0x169e48[_0x2909f6(0x173)]?.[_0x2909f6(0x1ad)]||_0x169e48['id'],'type':_0x5672ff[_0x2909f6(0x166)],'mcpServerName':_0x169e48[_0x2909f6(0x174)],'toolName':_0x169e48[_0x2909f6(0x14f)],'data':_0x169e48[_0x2909f6(0x173)]||{}};return{'id':_0x169e48['id'],'uiId':_0x169e48['id'],'label':_0x169e48[_0x2909f6(0x1b2)]?.[_0x2909f6(0x1ad)]||_0x169e48[_0x2909f6(0x170)]||_0x169e48[_0x2909f6(0x19c)]||_0x169e48['id'],'type':_0x169e48[_0x2909f6(0x1b3)],..._0x169e48?.[_0x2909f6(0x1b2)]?.[_0x2909f6(0x17a)]?{'resourceId':_0x169e48[_0x2909f6(0x1b2)]?.[_0x2909f6(0x17a)]}:{}};}[_0x215be7(0x1b7)](){const _0x27d53f=_0x215be7;return new Map(this[_0x27d53f(0x18d)]);}[_0x215be7(0x1bc)](_0x441cf9){const _0x499c0a=_0x215be7,_0xdac82=this[_0x499c0a(0x1bb)][_0x499c0a(0x132)](_0x441cf9);_0xdac82?.[_0x499c0a(0x1c0)]||this[_0x499c0a(0x1ac)](_0x441cf9);}[_0x215be7(0x164)](){const _0x15c169=_0x215be7;if(0x0===this[_0x15c169(0x1bb)][_0x15c169(0x162)])return;for(const _0x3ff1f2 of this[_0x15c169(0x1bb)][_0x15c169(0x147)]())this[_0x15c169(0x1ac)](_0x3ff1f2[_0x15c169(0x1a7)]);const _0x2366ad=this[_0x15c169(0x18d)][_0x15c169(0x132)](_0x15c169(0x1ba))||this[_0x15c169(0x1bb)][_0x15c169(0x132)](_0x15c169(0x1ba));_0x2366ad&&this[_0x15c169(0x156)]({..._0x2366ad,'isReadOnly':!0x0,'hidden':!0x0});}[_0x215be7(0x13a)](_0x5d7346){const _0x46d4c5=_0x215be7;for(const _0x4cb85d of _0x5d7346[_0x46d4c5(0x147)]())this[_0x46d4c5(0x150)](_0x4cb85d);this[_0x46d4c5(0x164)](),this[_0x46d4c5(0x197)](_0x46d4c5(0x1a0),{'contextItems':Array[_0x46d4c5(0x14d)](this[_0x46d4c5(0x1b7)]()[_0x46d4c5(0x147)]())});}[_0x215be7(0x15e)](){const _0x127715=_0x215be7;return this[_0x127715(0x1bb)][_0x127715(0x179)](_0x127715(0x1ba));}[_0x215be7(0x175)](){const _0x32f348=_0x215be7;return this[_0x32f348(0x1bb)][_0x32f348(0x179)](_0x32f348(0x13e));}[_0x215be7(0x14b)](){const _0x8f62e8=_0x215be7;return this[_0x8f62e8(0x18d)][_0x8f62e8(0x179)](_0x8f62e8(0x1ba));}static[_0x215be7(0x1be)](_0x4c5c3a){const _0x176909=_0x215be7;return Array[_0x176909(0x14d)](_0x4c5c3a[_0x176909(0x147)]())[_0x176909(0x17f)](_0x18cd68=>this[_0x176909(0x131)](_0x18cd68))[_0x176909(0x17d)](_0x56e337=>null!==_0x56e337);}async[_0x215be7(0x1af)](_0x242160,_0x50ff4e,_0x5e7899=_0x5672ff[_0x215be7(0x17c)]){const _0x22a9fb=_0x215be7,_0x488e49=_0x22a9fb(0x186)+_0x2913a4();this[_0x22a9fb(0x165)](_0x488e49);try{await Promise[_0x22a9fb(0x1b9)](_0x242160[_0x22a9fb(0x17f)](async _0x1cd86a=>{const _0x53a777=_0x22a9fb,_0x8012e3=_0x53a777(0x180)+_0x2913a4(),_0x49a504=_0x59bada(_0x1cd86a[_0x53a777(0x170)]);try{this[_0x53a777(0x156)]({'type':_0x5e7899,'label':_0x50ff4e?.[_0x53a777(0x1ad)]||_0x49a504,'uiId':_0x8012e3,'resourceId':_0x50ff4e?.[_0x53a777(0x17a)]},!0x0);const _0x1b8b41=this[_0x53a777(0x19d)][_0x53a777(0x14e)](this[_0x53a777(0x17e)],_0x1cd86a,_0x50ff4e);this[_0x53a777(0x191)][_0x53a777(0x169)](_0x8012e3,_0x1b8b41[_0x53a777(0x145)]);const {id:_0x40c849}=await _0x1b8b41[_0x53a777(0x1aa)]();this[_0x53a777(0x191)][_0x53a777(0x139)](_0x8012e3),this[_0x53a777(0x168)]({'type':_0x5e7899,'id':_0x40c849,'label':_0x50ff4e?.[_0x53a777(0x1ad)]||_0x49a504,'uiId':_0x8012e3,'resourceId':_0x50ff4e?.[_0x53a777(0x17a)]},!0x1);}catch(_0x67a94d){this[_0x53a777(0x191)][_0x53a777(0x139)](_0x8012e3);if(!(_0x67a94d instanceof _0x492d6f&&_0x67a94d[_0x53a777(0x130)][_0x53a777(0x16b)](_0x53a777(0x1a9)))){const _0x580796=_0x2fea76[_0x53a777(0x132)](_0x67a94d[_0x53a777(0x1a8)])||_0x53a777(0x189),_0x3a55c1=new _0x492d6f(_0x580796,null,{'fileName':_0x49a504,..._0x67a94d});_0x3a55c1[_0x53a777(0x136)]=_0x67a94d[_0x53a777(0x136)],this[_0x53a777(0x197)](_0x53a777(0x18f),{'error':_0x3a55c1});}this[_0x53a777(0x1ac)](_0x8012e3);}}));}finally{this[_0x22a9fb(0x14c)](_0x488e49);}}[_0x215be7(0x1b8)](_0x370ea7){const _0x312383=_0x215be7;if(this[_0x312383(0x15e)]()||!this[_0x312383(0x18c)][_0x312383(0x13d)][_0x312383(0x15f)])return;const _0x3561c0={'type':_0x5672ff[_0x312383(0x138)],'uiId':_0x312383(0x1ba),'label':_0x370ea7,'isReadOnly':this[_0x312383(0x18d)][_0x312383(0x179)](_0x312383(0x1ba)),'hidden':this[_0x312383(0x18d)][_0x312383(0x179)](_0x312383(0x1ba))};this[_0x312383(0x156)](_0x3561c0);}async[_0x215be7(0x152)](_0x5e0bca,_0x1bde62,_0x582d8b,_0x330272){const _0x2c8101=_0x215be7,_0x5c0f68=this[_0x2c8101(0x1bb)][_0x2c8101(0x132)](_0x2c8101(0x1ba));if(_0x5c0f68&&_0x5e0bca){_0x5c0f68[_0x2c8101(0x13e)]=_0x330272?_0x330272[_0x2c8101(0x17f)](_0x57f52c=>({'start':_0x57f52c[_0x2c8101(0x15d)],'end':_0x57f52c[_0x2c8101(0x153)]})):[];try{if(_0x5c0f68[_0x2c8101(0x18a)]===_0x1bde62)return;const {id:_0x137811}=await this[_0x2c8101(0x19d)][_0x2c8101(0x15b)](this[_0x2c8101(0x17e)],_0x5e0bca,{'version':_0x1bde62,'sessionId':_0x582d8b})[_0x2c8101(0x1aa)]();_0x5c0f68['id']=_0x137811,_0x5c0f68[_0x2c8101(0x14a)]=_0x5e0bca,_0x5c0f68[_0x2c8101(0x18a)]=_0x1bde62,_0x5c0f68[_0x2c8101(0x18e)]=_0x582d8b;}catch(_0x315455){const _0x4b1ab9=new _0x492d6f(_0x2c8101(0x19b),null);_0x4b1ab9[_0x2c8101(0x136)]=_0x315455[_0x2c8101(0x136)],this[_0x2c8101(0x197)](_0x2c8101(0x18f),{'error':_0x4b1ab9});}}}[_0x215be7(0x184)](_0x591c56){const _0x3957ea=_0x215be7;this[_0x3957ea(0x156)]({'type':_0x5672ff[_0x3957ea(0x1c2)],'label':_0x591c56,'uiId':_0x3957ea(0x13e),'content':_0x591c56});}[_0x215be7(0x140)](){const _0x3d13f9=_0x215be7;this[_0x3d13f9(0x1ac)](_0x3d13f9(0x13e));}async[_0x215be7(0x19a)](_0x4ca1df,_0x381364){const _0x1dd4ed=_0x215be7,_0x2ee2c3=_0x1dd4ed(0x1b4)+_0x2913a4();this[_0x1dd4ed(0x165)](_0x2ee2c3);const _0x4f2eda=_0x1dd4ed(0x1b4)+_0x2913a4();try{this[_0x1dd4ed(0x156)]({'type':_0x5672ff[_0x1dd4ed(0x146)],'label':_0x381364?.[_0x1dd4ed(0x1ad)]||_0x4ca1df,'uiId':_0x4f2eda,'resourceId':_0x381364?.[_0x1dd4ed(0x17a)]},!0x0);const _0x579660=this[_0x1dd4ed(0x19d)][_0x1dd4ed(0x154)](this[_0x1dd4ed(0x17e)],_0x4ca1df,_0x381364);this[_0x1dd4ed(0x191)][_0x1dd4ed(0x169)](_0x4f2eda,_0x579660[_0x1dd4ed(0x145)]);const {id:_0x1a7324}=await _0x579660[_0x1dd4ed(0x1aa)]();this[_0x1dd4ed(0x191)][_0x1dd4ed(0x139)](_0x4f2eda),this[_0x1dd4ed(0x168)]({'type':_0x5672ff[_0x1dd4ed(0x146)],'id':_0x1a7324,'label':_0x381364?.[_0x1dd4ed(0x1ad)]||_0x4ca1df,'uiId':_0x4f2eda,'resourceId':_0x381364?.[_0x1dd4ed(0x17a)]},!0x1);}catch(_0x5a6c25){this[_0x1dd4ed(0x191)][_0x1dd4ed(0x139)](_0x4f2eda),(_0x5a6c25[_0x1dd4ed(0x130)][_0x1dd4ed(0x16b)](_0x1dd4ed(0x1a9))||this[_0x1dd4ed(0x197)](_0x1dd4ed(0x18f),{'error':new _0x492d6f(_0x1dd4ed(0x19e),this,{'url':_0x4ca1df,'originalError':_0x5a6c25}),'url':_0x4ca1df}),this[_0x1dd4ed(0x1ac)](_0x4f2eda));}finally{this[_0x1dd4ed(0x14c)](_0x2ee2c3);}}[_0x215be7(0x187)](_0x14ddab){const _0x533410=_0x215be7;_0x14ddab['id']=_0x14ddab['id']??_0x2913a4()[_0x533410(0x183)](0x0,0x15),this[_0x533410(0x1bb)][_0x533410(0x169)](_0x14ddab[_0x533410(0x1a7)],_0x14ddab),this[_0x533410(0x197)](_0x533410(0x190),{'contextItem':_0x14ddab,'isLoading':!0x1});}async[_0x215be7(0x160)](_0x157f77,_0x212da5,_0x54855a){const _0x1e2db5=_0x215be7,_0x4b120a=this[_0x1e2db5(0x18c)][_0x1e2db5(0x149)][_0x1e2db5(0x1a3)](_0x5c8b0a=>_0x5c8b0a['id']===_0x157f77);if(!_0x4b120a)return this[_0x1e2db5(0x197)](_0x1e2db5(0x18f),{'error':new _0x492d6f(_0x1e2db5(0x151),this,{'sourceId':_0x157f77}),'sourceId':_0x157f77}),[];try{const _0x390b1c=(await _0x4b120a[_0x1e2db5(0x148)](_0x212da5))[_0x1e2db5(0x17f)](_0x3a36d0=>{const _0x15b559=_0x1e2db5,_0xb2f7b2=this[_0x15b559(0x198)](_0x3a36d0['id']);return{..._0x3a36d0,'isInContext':_0xb2f7b2};});return _0x4b120a[_0x1e2db5(0x19f)]=_0x390b1c,this[_0x1e2db5(0x197)](_0x1e2db5(0x16e),{'sourceId':_0x157f77,'source':_0x4b120a,'resources':_0x390b1c,'uid':_0x54855a}),_0x390b1c;}catch(_0x174722){return this[_0x1e2db5(0x197)](_0x1e2db5(0x18f),{'error':new _0x492d6f(_0x1e2db5(0x1c3),this,{'sourceId':_0x157f77,'originalError':_0x174722}),'sourceId':_0x157f77,'sourceLabel':_0x4b120a[_0x1e2db5(0x1ad)]}),[];}}async[_0x215be7(0x143)](_0x5e20c9,_0x5e4ad4){const _0x4814af=_0x215be7;if(this[_0x4814af(0x198)](_0x5e4ad4['id']))return;let _0x16b0a9=_0x5e4ad4[_0x4814af(0x173)];if(!_0x16b0a9&&_0x5e20c9[_0x4814af(0x1c1)])try{_0x16b0a9=await _0x5e20c9[_0x4814af(0x1c1)](_0x5e4ad4['id']);}catch(_0x4fe844){return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1b5),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'originalError':_0x4fe844}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}if(_0x16b0a9)switch(_0x5e4ad4[_0x4814af(0x1b3)]){case _0x5672ff[_0x4814af(0x146)]:if(_0x4814af(0x15a)!=typeof _0x16b0a9)return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x15a),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});await this[_0x4814af(0x19a)](_0x16b0a9,{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']});break;case _0x5672ff[_0x4814af(0x17c)]:if(!(_0x16b0a9 instanceof File))return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x141),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});await this[_0x4814af(0x1af)]([_0x16b0a9],{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']});break;case _0x5672ff[_0x4814af(0x193)]:if(_0x4814af(0x1b1)!=typeof _0x16b0a9||!(_0x4814af(0x14a)in _0x16b0a9)||!(_0x4814af(0x1b3)in _0x16b0a9))return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x155),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});_0x16b0a9=AIChatContext[_0x4814af(0x172)](_0x16b0a9,_0x5e4ad4[_0x4814af(0x1ad)]),await this[_0x4814af(0x1af)]([_0x16b0a9],{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']},_0x5672ff[_0x4814af(0x193)]);break;case _0x5672ff[_0x4814af(0x166)]:break;default:this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x167),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'resourceType':_0x5e4ad4[_0x4814af(0x1b3)]}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}else this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x16d),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}static[_0x215be7(0x172)](_0x2a83b4,_0x585752){const _0x4e9658=_0x215be7;switch(_0x2a83b4[_0x4e9658(0x1b3)]){case _0x5144de[_0x4e9658(0x163)]:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x1ae)});case _0x5144de[_0x4e9658(0x142)]:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x134)});default:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x17b)});}}static[_0x215be7(0x131)](_0x6dfd55){const _0x5f105f=_0x215be7;switch(_0x6dfd55[_0x5f105f(0x1b3)]){case _0x5672ff[_0x5f105f(0x17c)]:return{'type':_0x5672ff[_0x5f105f(0x17c)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x146)]:return{'type':_0x5672ff[_0x5f105f(0x146)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x138)]:return{'type':_0x5672ff[_0x5f105f(0x138)],'id':_0x6dfd55['id'],..._0x6dfd55[_0x5f105f(0x13e)]?.[_0x5f105f(0x194)]&&{'selection':_0x6dfd55[_0x5f105f(0x13e)]}};case _0x5672ff[_0x5f105f(0x193)]:return{'type':_0x5672ff[_0x5f105f(0x17c)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x166)]:{const _0x459810=_0x6dfd55;return{'type':_0x5672ff[_0x5f105f(0x166)],'mcpServerName':_0x459810[_0x5f105f(0x174)],'toolName':_0x459810[_0x5f105f(0x14f)],'data':_0x459810[_0x5f105f(0x173)],'id':_0x459810['id']};}default:return null;}}[_0x215be7(0x156)](_0x42ec74,_0x3fc885=!0x1){const _0x282762=_0x215be7;if(this[_0x282762(0x1bb)][_0x282762(0x169)](_0x42ec74[_0x282762(0x1a7)],_0x42ec74),_0x42ec74[_0x282762(0x161)]||this[_0x282762(0x197)](_0x282762(0x190),{'contextItem':_0x42ec74,'isLoading':_0x3fc885}),_0x282762(0x1ba)===_0x42ec74[_0x282762(0x1a7)]&&this[_0x282762(0x178)](),_0x42ec74[_0x282762(0x17a)]){const _0x1ecf83=this[_0x282762(0x177)](_0x42ec74[_0x282762(0x17a)]);_0x1ecf83&&_0x1ecf83[_0x282762(0x182)](_0x2bae3e=>{const _0x2052e4=_0x282762;this[_0x2052e4(0x16f)](_0x2bae3e,_0x42ec74[_0x2052e4(0x17a)],!0x0);});}}[_0x215be7(0x1ac)](_0x4b133d){const _0x6e45ee=_0x215be7,_0x1ff4cc=this[_0x6e45ee(0x1bb)][_0x6e45ee(0x132)](_0x4b133d),_0x184f00=this[_0x6e45ee(0x191)][_0x6e45ee(0x132)](_0x4b133d);if(_0x184f00&&(_0x184f00[_0x6e45ee(0x18b)](),this[_0x6e45ee(0x191)][_0x6e45ee(0x139)](_0x4b133d)),_0x1ff4cc?.[_0x6e45ee(0x17a)]){const _0xd23d5e=this[_0x6e45ee(0x177)](_0x1ff4cc[_0x6e45ee(0x17a)]);_0xd23d5e&&_0xd23d5e[_0x6e45ee(0x182)](_0x44ade7=>{const _0x1d227f=_0x6e45ee;this[_0x1d227f(0x16f)](_0x44ade7,_0x1ff4cc[_0x1d227f(0x17a)],!0x1);});}this[_0x6e45ee(0x1bb)][_0x6e45ee(0x139)](_0x4b133d),this[_0x6e45ee(0x197)](_0x6e45ee(0x181),{'uiId':_0x4b133d,'type':_0x1ff4cc?.[_0x6e45ee(0x1b3)]}),_0x6e45ee(0x1ba)===_0x4b133d&&this[_0x6e45ee(0x178)]();}[_0x215be7(0x168)](_0x264b50,_0x5a41fd){const _0x29a491=_0x215be7;if(this[_0x29a491(0x1bb)][_0x29a491(0x179)](_0x264b50[_0x29a491(0x1a7)])&&(this[_0x29a491(0x1bb)][_0x29a491(0x169)](_0x264b50[_0x29a491(0x1a7)],_0x264b50),this[_0x29a491(0x197)](_0x29a491(0x196),{'contextItem':_0x264b50,'isLoading':_0x5a41fd}),_0x264b50[_0x29a491(0x17a)])){const _0x3d3e9d=this[_0x29a491(0x177)](_0x264b50[_0x29a491(0x17a)]);_0x3d3e9d&&_0x3d3e9d[_0x29a491(0x182)](_0x2c2c3c=>{const _0x23542b=_0x29a491;this[_0x23542b(0x16f)](_0x2c2c3c,_0x264b50[_0x23542b(0x17a)],!0x0);});}}[_0x215be7(0x150)](_0x99cefa){const _0x3a5dcd=_0x215be7;this[_0x3a5dcd(0x18d)][_0x3a5dcd(0x169)](_0x99cefa[_0x3a5dcd(0x1a7)],_0x99cefa);}[_0x215be7(0x159)](){const _0x2bb8cd=_0x215be7;this[_0x2bb8cd(0x18c)]={'document':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x13d)]?.[_0x2bb8cd(0x15f)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x195)]?.[_0x2bb8cd(0x15f)]},'files':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x171)]?.[_0x2bb8cd(0x15f)]},'sources':this[_0x2bb8cd(0x1a2)](),'customItems':this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x15c)]?.[_0x2bb8cd(0x17f)](_0x4daef1=>({..._0x4daef1,'enabled':!0x0}))??[]},this[_0x2bb8cd(0x197)](_0x2bb8cd(0x1a5),{'options':this[_0x2bb8cd(0x18c)]});}[_0x215be7(0x1a2)](){const _0x35b4f6=_0x215be7;return this[_0x35b4f6(0x1b6)]?.[_0x35b4f6(0x149)]?.[_0x35b4f6(0x17f)](_0x57f200=>({..._0x57f200,'resources':[]}))??[];}[_0x215be7(0x178)](){const _0x2d94fc=_0x215be7,_0x5c20ed=this[_0x2d94fc(0x15e)]()||this[_0x2d94fc(0x14b)]();this[_0x2d94fc(0x18c)][_0x2d94fc(0x13d)][_0x2d94fc(0x1ab)]=_0x5c20ed,this[_0x2d94fc(0x197)](_0x2d94fc(0x1a5),{'options':this[_0x2d94fc(0x18c)]});}[_0x215be7(0x198)](_0x1d915e){const _0x3a8d2d=_0x215be7;for(const _0x16c7a6 of this[_0x3a8d2d(0x1bb)][_0x3a8d2d(0x147)]())if(_0x16c7a6[_0x3a8d2d(0x17a)]===_0x1d915e)return!0x0;for(const _0x113dae of this[_0x3a8d2d(0x18d)][_0x3a8d2d(0x147)]())if(_0x113dae[_0x3a8d2d(0x17a)]===_0x1d915e)return!0x0;return!0x1;}[_0x215be7(0x177)](_0x3f1770){const _0x2b52b4=_0x215be7,_0x606c61=[];for(const _0x520a74 of this[_0x2b52b4(0x18c)][_0x2b52b4(0x149)]){_0x520a74[_0x2b52b4(0x19f)][_0x2b52b4(0x1a3)](_0xd43104=>_0xd43104['id']===_0x3f1770)&&_0x606c61[_0x2b52b4(0x1bd)](_0x520a74['id']);}return 0x0===_0x606c61[_0x2b52b4(0x194)]?null:_0x606c61;}[_0x215be7(0x16f)](_0xda2daf,_0x23e21c,_0x1993bb){const _0x15717e=_0x215be7,_0x2870d4=this[_0x15717e(0x18c)][_0x15717e(0x149)][_0x15717e(0x1a3)](_0x750952=>_0x750952['id']===_0xda2daf);if(!_0x2870d4)return;const _0x1a865d=_0x2870d4[_0x15717e(0x19f)][_0x15717e(0x1a3)](_0x16ddfd=>_0x16ddfd['id']===_0x23e21c);_0x1a865d&&(_0x1a865d[_0x15717e(0x192)]=_0x1993bb,this[_0x15717e(0x197)](_0x15717e(0x157),{'sourceId':_0xda2daf,'resourceId':_0x23e21c,'isInContext':_0x1993bb}));}[_0x215be7(0x165)](_0x54114d){const _0x475827=_0x215be7;this[_0x475827(0x133)][_0x475827(0x169)](_0x54114d,!0x0),this[_0x475827(0x133)][_0x475827(0x162)]&&this[_0x475827(0x197)](_0x475827(0x13f),{'isUploadInProgress':!0x0});}[_0x215be7(0x14c)](_0x5aa3cf){const _0x42d25e=_0x215be7;this[_0x42d25e(0x133)][_0x42d25e(0x139)](_0x5aa3cf),0x0===this[_0x42d25e(0x133)][_0x42d25e(0x162)]&&this[_0x42d25e(0x197)](_0x42d25e(0x13f),{'isUploadInProgress':!0x1});}}function _0x4d43(){const _0x722e24=['ai-chat-context-invalid-data','addContextOptionsChanged','populateFromMessage','uiId','code','ai-request-aborted','getId','isHidden','_removeContextItem','label','text/markdown','addFilesToContext','174HxKOOA','object','attributes','type','url-','ai-chat-resource-load-failed','_config','getSentContextItems','addCurrentDocumentToContext','all','current-document','_pendingContextItems','removeFromContext','push','mapContextItemsToRequestData','fetchDocument','isReadOnly','getData','SELECTION','ai-chat-source-resources-load-failed','message','_mapContextItemToRequestData','get','_ongoingUploadOperations','text/html','84637SxlOQg','stack','Current\x20document','DOCUMENT','delete','addToConversationContext','382822jBSinQ','176248CsKUCx','document','selection','uploadProgressChanged','removeSelectionFromContext','File','HTML','addResourceToContext','getPendingContextItems','abortController','URL','values','getResources','sources','content','isCurrentDocumentInConversation','_finishUploadOperation','from','uploadFile','toolName','_addToConversationContextItem','ai-chat-source-not-found','updateCurrentDocument','end','uploadUrl','object\x20with\x20content\x20and\x20type\x20properties','_addContextItem','resourceStateChanged','1089270LSnLHT','_setAddContextOptionsDefaultState','string','uploadDocument','customItems','start','isCurrentDocumentInContext','enabled','loadSourceResources','hidden','size','MARKDOWN','clearPendingContextItems','_startUploadOperation','TOOL','ai-chat-context-unsupported-type','_finishContextItemLoading','set','_createContextItemFromContent','startsWith','1613650CfuNAt','ai-chat-resource-no-data','sourceResourcesLoaded','_updateResourceInContextState','name','files','_convertTextResourceToFile','data','mcpServerName','isSelectionInContext','36864HbEeUC','_findSourceIdsByResourceId','_toggleAddCurrentDocumentOptionVisibility','has','resourceId','text/plain','FILE','filter','_ownerId','map','file-','contextItemRemoved','forEach','substring','addSelectionToContext','110373qldNOT','files-','addToolItemToContext','init','ai-chat-file-upload-failed','version','abort','_addContextOptionsState','_conversationContextItems','sessionId','error','contextItemAdded','_ongoingUploads','isInContext','TEXT','length','urls','contextItemLoadingEnded','fire','_isResourceInContext','getDocument','addUrlToContext','ai-chat-document-upload-failed','url','_connector','ai-chat-url-upload-failed','resources','contextSent','1736OWIJDV','_getCustomSourcesInitialState','find'];_0x4d43=function(){return _0x722e24;};return _0x4d43();}
23
+ const _0x39d083=_0x1a21;(function(_0xf3516f,_0x4cf5c8){const _0x29dcb4=_0x1a21,_0x2cf1e8=_0xf3516f();while(!![]){try{const _0xdadbdc=-parseInt(_0x29dcb4(0xf1))/0x1*(parseInt(_0x29dcb4(0x12f))/0x2)+-parseInt(_0x29dcb4(0xdd))/0x3*(-parseInt(_0x29dcb4(0x13f))/0x4)+-parseInt(_0x29dcb4(0x125))/0x5*(-parseInt(_0x29dcb4(0x157))/0x6)+-parseInt(_0x29dcb4(0x105))/0x7+-parseInt(_0x29dcb4(0x13a))/0x8+-parseInt(_0x29dcb4(0xf4))/0x9+parseInt(_0x29dcb4(0xdb))/0xa;if(_0xdadbdc===_0x4cf5c8)break;else _0x2cf1e8['push'](_0x2cf1e8['shift']());}catch(_0x388b03){_0x2cf1e8['push'](_0x2cf1e8['shift']());}}}(_0x55f1,0x9c51a));import{CKEditorError as _0x1a561e,ObservableMixin as _0x2f3895,uid as _0x117d6e}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x1f0fd5,AIContextTextResourceType as _0x3d6043}from'../../aicore/model/aicontext.js';import{escape as _0x4f66b0}from'es-toolkit/compat';import{errorsMap as _0x1665c2}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x39d083(0xfe),_0x39d083(0x107),_0x39d083(0x15b),_0x39d083(0x12e),_0x39d083(0xd6),_0x39d083(0x142),_0x39d083(0x12b),_0x39d083(0x129),_0x39d083(0x15f)];function _0x55f1(){const _0x4e039c=['substring','FILE','message','populateFromMessage','_convertTextResourceToFile','has','object','uploadFile','files','ai-request-aborted','addSelectionToContext','ai-chat-url-upload-failed','isCurrentDocumentInContext','fire','from','customItems','_ongoingUploads','sources','addResourceToContext','2014164oyLQAH','_addToConversationContextItem','getPendingContextItems','addCurrentDocumentToContext','contextItemLoadingEnded','filter','code','delete','uploadProgressChanged','TOOL','removeSelectionFromContext','isSelectionInContext','object\x20with\x20content\x20and\x20type\x20properties','getResources','url','_pendingContextItems','urls','SELECTION','document','_updateResourceInContextState','error','_startUploadOperation','_ownerId','enabled','all','15358080AiyZBl','attributes','6798UvORfo','_findSourceIdsByResourceId','url-','File','values','TEXT','_setAddContextOptionsDefaultState','forEach','resources','ai-chat-context-invalid-data','ai-chat-resource-no-data','name','text/plain','addToConversationContext','MARKDOWN','selection','ai-chat-resource-load-failed','_isResourceInContext','Current\x20document','loadSourceResources','1RSnUMu','isHidden','ai-chat-source-resources-load-failed','9751545EEgmuI','resourceId','push','isInContext','ai-chat-context-unsupported-type','addToolItemToContext','uiId','_finishUploadOperation','clearPendingContextItems','addFilesToContext','contextItemAdded','current-document','files-','get','text/markdown','_mapContextItemToRequestData','length','1560601mvITkb','start','contextItemRemoved','getId','map','ai-chat-file-upload-failed','DOCUMENT','version','init','_removeContextItem','_connector','getDocument','_addContextItem','find','_ongoingUploadOperations','data','addUrlToContext','_createContextItemFromContent','text/html','uploadUrl','uploadDocument','_config','label','string','isReadOnly','_conversationContextItems','abort','updateCurrentDocument','startsWith','isCurrentDocumentInConversation','stack','file-','15rECjDF','ai-chat-source-not-found','sessionId','fetchDocument','resourceStateChanged','removeFromContext','sourceResourcesLoaded','getData','getSentContextItems','contextSent','1575626FThBqt','_addContextOptionsState','URL','content','type','toolName','_finishContextItemLoading','_getCustomSourcesInitialState','ai-chat-document-upload-failed','end','size','6424968PmFFAt','HTML','set','abortController','_toggleAddCurrentDocumentOptionVisibility','1756YYsgsH','hidden','mapContextItemsToRequestData','addContextOptionsChanged','mcpServerName'];_0x55f1=function(){return _0x4e039c;};return _0x55f1();}function _0x1a21(_0x156239,_0x5ed3c1){const _0x55f1d3=_0x55f1();return _0x1a21=function(_0x1a216b,_0xc3ffe){_0x1a216b=_0x1a216b-0xd1;let _0x2d010d=_0x55f1d3[_0x1a216b];return _0x2d010d;},_0x1a21(_0x156239,_0x5ed3c1);}export class AIChatContext extends _0x2f3895(){[_0x39d083(0x10f)];[_0x39d083(0x11a)];[_0x39d083(0xd8)];constructor({connector:_0x1f3f73,config:_0x42193d,ownerId:_0x4ba710}){const _0xf267ca=_0x39d083;super(),this[_0xf267ca(0x10f)]=_0x1f3f73,this[_0xf267ca(0x11a)]=_0x42193d,this[_0xf267ca(0xd8)]=_0x4ba710;}[_0x39d083(0x10d)](){const _0x2d4cfb=_0x39d083;this[_0x2d4cfb(0xd1)]=new Map(),this[_0x2d4cfb(0x11e)]=new Map(),this[_0x2d4cfb(0x154)]=new Map(),this[_0x2d4cfb(0x113)]=new Map(),this[_0x2d4cfb(0xe3)]();}[_0x39d083(0x159)](){const _0x408811=_0x39d083;return this[_0x408811(0xd1)];}async[_0x39d083(0x147)](_0x2e4bb7){const _0x9b0f8e=_0x39d083,_0x51d6a7=await this[_0x9b0f8e(0x116)](_0x2e4bb7);return this[_0x9b0f8e(0x158)](_0x51d6a7),_0x9b0f8e(0xff)===_0x51d6a7[_0x9b0f8e(0xfa)]&&this[_0x9b0f8e(0x13e)](),_0x51d6a7;}async[_0x39d083(0x116)](_0x27c3b8){const _0xb1d551=_0x39d083;if(_0x27c3b8[_0xb1d551(0x133)]===_0x1f0fd5[_0xb1d551(0x10b)]){const _0x52d8fa=await this[_0xb1d551(0x10f)][_0xb1d551(0x128)](this[_0xb1d551(0xd8)],_0x27c3b8['id'])[_0xb1d551(0x110)]();return{'id':_0xb1d551(0xff),'uiId':_0xb1d551(0xff),'label':_0xb1d551(0xef),'type':_0x27c3b8[_0xb1d551(0x133)],'content':_0x52d8fa[_0xb1d551(0x132)],'hidden':this[_0xb1d551(0x11e)][_0xb1d551(0x149)](_0xb1d551(0xff)),'version':_0x52d8fa[_0xb1d551(0xdc)]?.[_0xb1d551(0x10c)],'sessionId':_0x52d8fa[_0xb1d551(0xdc)]?.[_0xb1d551(0x127)]};}if(_0x27c3b8[_0xb1d551(0x133)]===_0x1f0fd5[_0xb1d551(0x160)])return{'id':_0x27c3b8['id'],'uiId':_0x27c3b8['id'],'label':_0x27c3b8[_0xb1d551(0x114)]?.[_0xb1d551(0x11b)]||_0x27c3b8['id'],'type':_0x1f0fd5[_0xb1d551(0x160)],'mcpServerName':_0x27c3b8[_0xb1d551(0x143)],'toolName':_0x27c3b8[_0xb1d551(0x134)],'data':_0x27c3b8[_0xb1d551(0x114)]||{}};return{'id':_0x27c3b8['id'],'uiId':_0x27c3b8['id'],'label':_0x27c3b8[_0xb1d551(0xdc)]?.[_0xb1d551(0x11b)]||_0x27c3b8[_0xb1d551(0xe8)]||_0x27c3b8[_0xb1d551(0x165)]||_0x27c3b8['id'],'type':_0x27c3b8[_0xb1d551(0x133)],..._0x27c3b8?.[_0xb1d551(0xdc)]?.[_0xb1d551(0xf5)]?{'resourceId':_0x27c3b8[_0xb1d551(0xdc)]?.[_0xb1d551(0xf5)]}:{}};}[_0x39d083(0x12d)](){const _0x218bb6=_0x39d083;return new Map(this[_0x218bb6(0x11e)]);}[_0x39d083(0x12a)](_0x18f1c7){const _0x27dca8=_0x39d083,_0x2a9962=this[_0x27dca8(0xd1)][_0x27dca8(0x101)](_0x18f1c7);_0x2a9962?.[_0x27dca8(0x11d)]||this[_0x27dca8(0x10e)](_0x18f1c7);}[_0x39d083(0xfc)](){const _0x159375=_0x39d083;if(0x0===this[_0x159375(0xd1)][_0x159375(0x139)])return;for(const _0x5d91ac of this[_0x159375(0xd1)][_0x159375(0xe1)]())this[_0x159375(0x10e)](_0x5d91ac[_0x159375(0xfa)]);const _0x5c053=this[_0x159375(0x11e)][_0x159375(0x101)](_0x159375(0xff))||this[_0x159375(0xd1)][_0x159375(0x101)](_0x159375(0xff));_0x5c053&&this[_0x159375(0x111)]({..._0x5c053,'isReadOnly':!0x0,'hidden':!0x0});}[_0x39d083(0xea)](_0x33af7c){const _0x52cf3f=_0x39d083;for(const _0x291537 of _0x33af7c[_0x52cf3f(0xe1)]())this[_0x52cf3f(0x158)](_0x291537);this[_0x52cf3f(0xfc)](),this[_0x52cf3f(0x151)](_0x52cf3f(0x12e),{'contextItems':Array[_0x52cf3f(0x152)](this[_0x52cf3f(0x12d)]()[_0x52cf3f(0xe1)]())});}[_0x39d083(0x150)](){const _0x35b5ae=_0x39d083;return this[_0x35b5ae(0xd1)][_0x35b5ae(0x149)](_0x35b5ae(0xff));}[_0x39d083(0x162)](){const _0x54d148=_0x39d083;return this[_0x54d148(0xd1)][_0x54d148(0x149)](_0x54d148(0xec));}[_0x39d083(0x122)](){const _0xc9fe13=_0x39d083;return this[_0xc9fe13(0x11e)][_0xc9fe13(0x149)](_0xc9fe13(0xff));}static[_0x39d083(0x141)](_0xc566ed){const _0x484991=_0x39d083;return Array[_0x484991(0x152)](_0xc566ed[_0x484991(0xe1)]())[_0x484991(0x109)](_0x1c5485=>this[_0x484991(0x103)](_0x1c5485))[_0x484991(0x15c)](_0x957f01=>null!==_0x957f01);}async[_0x39d083(0xfd)](_0x2c4380,_0xac8d04,_0xbb4896=_0x1f0fd5[_0x39d083(0x145)]){const _0x430b7b=_0x39d083,_0x444a2a=_0x430b7b(0x100)+_0x117d6e();this[_0x430b7b(0xd7)](_0x444a2a);try{await Promise[_0x430b7b(0xda)](_0x2c4380[_0x430b7b(0x109)](async _0x3b0d66=>{const _0x4f2ed8=_0x430b7b,_0xd73691=_0x4f2ed8(0x124)+_0x117d6e(),_0xacdfc6=_0x4f66b0(_0x3b0d66[_0x4f2ed8(0xe8)]);try{this[_0x4f2ed8(0x111)]({'type':_0xbb4896,'label':_0xac8d04?.[_0x4f2ed8(0x11b)]||_0xacdfc6,'uiId':_0xd73691,'resourceId':_0xac8d04?.[_0x4f2ed8(0xf5)]},!0x0);const _0x1823fc=this[_0x4f2ed8(0x10f)][_0x4f2ed8(0x14b)](this[_0x4f2ed8(0xd8)],_0x3b0d66,_0xac8d04);this[_0x4f2ed8(0x154)][_0x4f2ed8(0x13c)](_0xd73691,_0x1823fc[_0x4f2ed8(0x13d)]);const {id:_0x4a227a}=await _0x1823fc[_0x4f2ed8(0x108)]();this[_0x4f2ed8(0x154)][_0x4f2ed8(0x15e)](_0xd73691),this[_0x4f2ed8(0x135)]({'type':_0xbb4896,'id':_0x4a227a,'label':_0xac8d04?.[_0x4f2ed8(0x11b)]||_0xacdfc6,'uiId':_0xd73691,'resourceId':_0xac8d04?.[_0x4f2ed8(0xf5)]},!0x1);}catch(_0x2ce90a){this[_0x4f2ed8(0x154)][_0x4f2ed8(0x15e)](_0xd73691);if(!(_0x2ce90a instanceof _0x1a561e&&_0x2ce90a[_0x4f2ed8(0x146)][_0x4f2ed8(0x121)](_0x4f2ed8(0x14d)))){const _0x5d8e11=_0x1665c2[_0x4f2ed8(0x101)](_0x2ce90a[_0x4f2ed8(0x15d)])||_0x4f2ed8(0x10a),_0x3be718=new _0x1a561e(_0x5d8e11,null,{'fileName':_0xacdfc6,..._0x2ce90a});_0x3be718[_0x4f2ed8(0x123)]=_0x2ce90a[_0x4f2ed8(0x123)],this[_0x4f2ed8(0x151)](_0x4f2ed8(0xd6),{'error':_0x3be718});}this[_0x4f2ed8(0x10e)](_0xd73691);}}));}finally{this[_0x430b7b(0xfb)](_0x444a2a);}}[_0x39d083(0x15a)](_0x257257){const _0xb93a0=_0x39d083;if(this[_0xb93a0(0x150)]()||!this[_0xb93a0(0x130)][_0xb93a0(0xd4)][_0xb93a0(0xd9)])return;const _0x2a7613={'type':_0x1f0fd5[_0xb93a0(0x10b)],'uiId':_0xb93a0(0xff),'label':_0x257257,'isReadOnly':this[_0xb93a0(0x11e)][_0xb93a0(0x149)](_0xb93a0(0xff)),'hidden':this[_0xb93a0(0x11e)][_0xb93a0(0x149)](_0xb93a0(0xff))};this[_0xb93a0(0x111)](_0x2a7613);}async[_0x39d083(0x120)](_0x3fe2a1,_0x18ea29,_0x4f20a6,_0x1f12fd){const _0x5e6e64=_0x39d083,_0x630365=this[_0x5e6e64(0xd1)][_0x5e6e64(0x101)](_0x5e6e64(0xff));if(_0x630365&&_0x3fe2a1){_0x630365[_0x5e6e64(0xec)]=_0x1f12fd?_0x1f12fd[_0x5e6e64(0x109)](_0x452f04=>({'start':_0x452f04[_0x5e6e64(0x106)],'end':_0x452f04[_0x5e6e64(0x138)]})):[];try{if(_0x630365[_0x5e6e64(0x10c)]===_0x18ea29)return;const {id:_0x498857}=await this[_0x5e6e64(0x10f)][_0x5e6e64(0x119)](this[_0x5e6e64(0xd8)],_0x3fe2a1,{'version':_0x18ea29,'sessionId':_0x4f20a6})[_0x5e6e64(0x108)]();_0x630365['id']=_0x498857,_0x630365[_0x5e6e64(0x132)]=_0x3fe2a1,_0x630365[_0x5e6e64(0x10c)]=_0x18ea29,_0x630365[_0x5e6e64(0x127)]=_0x4f20a6;}catch(_0x439e15){const _0x2a162b=new _0x1a561e(_0x5e6e64(0x137),null);_0x2a162b[_0x5e6e64(0x123)]=_0x439e15[_0x5e6e64(0x123)],this[_0x5e6e64(0x151)](_0x5e6e64(0xd6),{'error':_0x2a162b});}}}[_0x39d083(0x14e)](_0x124ce2){const _0x28de24=_0x39d083;this[_0x28de24(0x111)]({'type':_0x1f0fd5[_0x28de24(0xd3)],'label':_0x124ce2,'uiId':_0x28de24(0xec),'content':_0x124ce2});}[_0x39d083(0x161)](){const _0xb2a59e=_0x39d083;this[_0xb2a59e(0x10e)](_0xb2a59e(0xec));}async[_0x39d083(0x115)](_0x2f253d,_0x15342a){const _0x3f1a3d=_0x39d083,_0x266aba=_0x3f1a3d(0xdf)+_0x117d6e();this[_0x3f1a3d(0xd7)](_0x266aba);const _0x3800e7=_0x3f1a3d(0xdf)+_0x117d6e();try{this[_0x3f1a3d(0x111)]({'type':_0x1f0fd5[_0x3f1a3d(0x131)],'label':_0x15342a?.[_0x3f1a3d(0x11b)]||_0x2f253d,'uiId':_0x3800e7,'resourceId':_0x15342a?.[_0x3f1a3d(0xf5)]},!0x0);const _0x44f559=this[_0x3f1a3d(0x10f)][_0x3f1a3d(0x118)](this[_0x3f1a3d(0xd8)],_0x2f253d,_0x15342a);this[_0x3f1a3d(0x154)][_0x3f1a3d(0x13c)](_0x3800e7,_0x44f559[_0x3f1a3d(0x13d)]);const {id:_0x4ddfa2}=await _0x44f559[_0x3f1a3d(0x108)]();this[_0x3f1a3d(0x154)][_0x3f1a3d(0x15e)](_0x3800e7),this[_0x3f1a3d(0x135)]({'type':_0x1f0fd5[_0x3f1a3d(0x131)],'id':_0x4ddfa2,'label':_0x15342a?.[_0x3f1a3d(0x11b)]||_0x2f253d,'uiId':_0x3800e7,'resourceId':_0x15342a?.[_0x3f1a3d(0xf5)]},!0x1);}catch(_0x17a547){this[_0x3f1a3d(0x154)][_0x3f1a3d(0x15e)](_0x3800e7),(_0x17a547[_0x3f1a3d(0x146)][_0x3f1a3d(0x121)](_0x3f1a3d(0x14d))||this[_0x3f1a3d(0x151)](_0x3f1a3d(0xd6),{'error':new _0x1a561e(_0x3f1a3d(0x14f),this,{'url':_0x2f253d,'originalError':_0x17a547}),'url':_0x2f253d}),this[_0x3f1a3d(0x10e)](_0x3800e7));}finally{this[_0x3f1a3d(0xfb)](_0x266aba);}}[_0x39d083(0xf9)](_0x3c4ead){const _0x59abe0=_0x39d083;_0x3c4ead['id']=_0x3c4ead['id']??_0x117d6e()[_0x59abe0(0x144)](0x0,0x15),this[_0x59abe0(0xd1)][_0x59abe0(0x13c)](_0x3c4ead[_0x59abe0(0xfa)],_0x3c4ead),this[_0x59abe0(0x151)](_0x59abe0(0xfe),{'contextItem':_0x3c4ead,'isLoading':!0x1});}async[_0x39d083(0xf0)](_0x83b0cf,_0x27566f,_0x103fb8){const _0x1480a7=_0x39d083,_0x2f9f2c=this[_0x1480a7(0x130)][_0x1480a7(0x155)][_0x1480a7(0x112)](_0x153a27=>_0x153a27['id']===_0x83b0cf);if(!_0x2f9f2c)return this[_0x1480a7(0x151)](_0x1480a7(0xd6),{'error':new _0x1a561e(_0x1480a7(0x126),this,{'sourceId':_0x83b0cf}),'sourceId':_0x83b0cf}),[];try{const _0x313ce9=(await _0x2f9f2c[_0x1480a7(0x164)](_0x27566f))[_0x1480a7(0x109)](_0x2de955=>{const _0x38a47b=_0x1480a7,_0x5c07fc=this[_0x38a47b(0xee)](_0x2de955['id']);return{..._0x2de955,'isInContext':_0x5c07fc};});return _0x2f9f2c[_0x1480a7(0xe5)]=_0x313ce9,this[_0x1480a7(0x151)](_0x1480a7(0x12b),{'sourceId':_0x83b0cf,'source':_0x2f9f2c,'resources':_0x313ce9,'uid':_0x103fb8}),_0x313ce9;}catch(_0x2e5183){return this[_0x1480a7(0x151)](_0x1480a7(0xd6),{'error':new _0x1a561e(_0x1480a7(0xf3),this,{'sourceId':_0x83b0cf,'originalError':_0x2e5183}),'sourceId':_0x83b0cf,'sourceLabel':_0x2f9f2c[_0x1480a7(0x11b)]}),[];}}async[_0x39d083(0x156)](_0x3b6529,_0x4b2ea2){const _0x3b6e85=_0x39d083;if(this[_0x3b6e85(0xee)](_0x4b2ea2['id']))return;let _0x1d397f=_0x4b2ea2[_0x3b6e85(0x114)];if(!_0x1d397f&&_0x3b6529[_0x3b6e85(0x12c)])try{_0x1d397f=await _0x3b6529[_0x3b6e85(0x12c)](_0x4b2ea2['id']);}catch(_0xebc98d){return void this[_0x3b6e85(0x151)](_0x3b6e85(0xd6),{'error':new _0x1a561e(_0x3b6e85(0xed),this,{'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id'],'originalError':_0xebc98d}),'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']});}if(_0x1d397f)switch(_0x4b2ea2[_0x3b6e85(0x133)]){case _0x1f0fd5[_0x3b6e85(0x131)]:if(_0x3b6e85(0x11c)!=typeof _0x1d397f)return void this[_0x3b6e85(0x151)](_0x3b6e85(0xd6),{'error':new _0x1a561e(_0x3b6e85(0xe6),this,{'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id'],'expectedType':_0x3b6e85(0x11c),'actualType':typeof _0x1d397f}),'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']});await this[_0x3b6e85(0x115)](_0x1d397f,{'label':_0x4b2ea2[_0x3b6e85(0x11b)],'resourceId':_0x4b2ea2['id']});break;case _0x1f0fd5[_0x3b6e85(0x145)]:if(!(_0x1d397f instanceof File))return void this[_0x3b6e85(0x151)](_0x3b6e85(0xd6),{'error':new _0x1a561e(_0x3b6e85(0xe6),this,{'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id'],'expectedType':_0x3b6e85(0xe0),'actualType':typeof _0x1d397f}),'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']});await this[_0x3b6e85(0xfd)]([_0x1d397f],{'label':_0x4b2ea2[_0x3b6e85(0x11b)],'resourceId':_0x4b2ea2['id']});break;case _0x1f0fd5[_0x3b6e85(0xe2)]:if(_0x3b6e85(0x14a)!=typeof _0x1d397f||!(_0x3b6e85(0x132)in _0x1d397f)||!(_0x3b6e85(0x133)in _0x1d397f))return void this[_0x3b6e85(0x151)](_0x3b6e85(0xd6),{'error':new _0x1a561e(_0x3b6e85(0xe6),this,{'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id'],'expectedType':_0x3b6e85(0x163),'actualType':typeof _0x1d397f}),'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']});_0x1d397f=AIChatContext[_0x3b6e85(0x148)](_0x1d397f,_0x4b2ea2[_0x3b6e85(0x11b)]),await this[_0x3b6e85(0xfd)]([_0x1d397f],{'label':_0x4b2ea2[_0x3b6e85(0x11b)],'resourceId':_0x4b2ea2['id']},_0x1f0fd5[_0x3b6e85(0xe2)]);break;case _0x1f0fd5[_0x3b6e85(0x160)]:break;default:this[_0x3b6e85(0x151)](_0x3b6e85(0xd6),{'error':new _0x1a561e(_0x3b6e85(0xf8),this,{'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id'],'resourceType':_0x4b2ea2[_0x3b6e85(0x133)]}),'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']});}else this[_0x3b6e85(0x151)](_0x3b6e85(0xd6),{'error':new _0x1a561e(_0x3b6e85(0xe7),this,{'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']}),'resourceId':_0x4b2ea2['id'],'sourceId':_0x3b6529['id']});}static[_0x39d083(0x148)](_0xe89e19,_0x1c92a8){const _0x4a312=_0x39d083;switch(_0xe89e19[_0x4a312(0x133)]){case _0x3d6043[_0x4a312(0xeb)]:return new File([_0xe89e19[_0x4a312(0x132)]],_0x1c92a8,{'type':_0x4a312(0x102)});case _0x3d6043[_0x4a312(0x13b)]:return new File([_0xe89e19[_0x4a312(0x132)]],_0x1c92a8,{'type':_0x4a312(0x117)});default:return new File([_0xe89e19[_0x4a312(0x132)]],_0x1c92a8,{'type':_0x4a312(0xe9)});}}static[_0x39d083(0x103)](_0x542a32){const _0x1bfd6b=_0x39d083;switch(_0x542a32[_0x1bfd6b(0x133)]){case _0x1f0fd5[_0x1bfd6b(0x145)]:return{'type':_0x1f0fd5[_0x1bfd6b(0x145)],'id':_0x542a32['id']};case _0x1f0fd5[_0x1bfd6b(0x131)]:return{'type':_0x1f0fd5[_0x1bfd6b(0x131)],'id':_0x542a32['id']};case _0x1f0fd5[_0x1bfd6b(0x10b)]:return{'type':_0x1f0fd5[_0x1bfd6b(0x10b)],'id':_0x542a32['id'],..._0x542a32[_0x1bfd6b(0xec)]?.[_0x1bfd6b(0x104)]&&{'selection':_0x542a32[_0x1bfd6b(0xec)]}};case _0x1f0fd5[_0x1bfd6b(0xe2)]:return{'type':_0x1f0fd5[_0x1bfd6b(0x145)],'id':_0x542a32['id']};case _0x1f0fd5[_0x1bfd6b(0x160)]:{const _0x36cd68=_0x542a32;return{'type':_0x1f0fd5[_0x1bfd6b(0x160)],'mcpServerName':_0x36cd68[_0x1bfd6b(0x143)],'toolName':_0x36cd68[_0x1bfd6b(0x134)],'data':_0x36cd68[_0x1bfd6b(0x114)],'id':_0x36cd68['id']};}default:return null;}}[_0x39d083(0x111)](_0x2d248f,_0x17aab5=!0x1){const _0x5251c9=_0x39d083;if(this[_0x5251c9(0xd1)][_0x5251c9(0x13c)](_0x2d248f[_0x5251c9(0xfa)],_0x2d248f),_0x2d248f[_0x5251c9(0x140)]||this[_0x5251c9(0x151)](_0x5251c9(0xfe),{'contextItem':_0x2d248f,'isLoading':_0x17aab5}),_0x5251c9(0xff)===_0x2d248f[_0x5251c9(0xfa)]&&this[_0x5251c9(0x13e)](),_0x2d248f[_0x5251c9(0xf5)]){const _0x5031ba=this[_0x5251c9(0xde)](_0x2d248f[_0x5251c9(0xf5)]);_0x5031ba&&_0x5031ba[_0x5251c9(0xe4)](_0x55f414=>{const _0x3bf0cd=_0x5251c9;this[_0x3bf0cd(0xd5)](_0x55f414,_0x2d248f[_0x3bf0cd(0xf5)],!0x0);});}}[_0x39d083(0x10e)](_0x2cb653){const _0x2700e2=_0x39d083,_0x5530a8=this[_0x2700e2(0xd1)][_0x2700e2(0x101)](_0x2cb653),_0x56524a=this[_0x2700e2(0x154)][_0x2700e2(0x101)](_0x2cb653);if(_0x56524a&&(_0x56524a[_0x2700e2(0x11f)](),this[_0x2700e2(0x154)][_0x2700e2(0x15e)](_0x2cb653)),_0x5530a8?.[_0x2700e2(0xf5)]){const _0x255814=this[_0x2700e2(0xde)](_0x5530a8[_0x2700e2(0xf5)]);_0x255814&&_0x255814[_0x2700e2(0xe4)](_0x333e38=>{const _0x76ab4a=_0x2700e2;this[_0x76ab4a(0xd5)](_0x333e38,_0x5530a8[_0x76ab4a(0xf5)],!0x1);});}this[_0x2700e2(0xd1)][_0x2700e2(0x15e)](_0x2cb653),this[_0x2700e2(0x151)](_0x2700e2(0x107),{'uiId':_0x2cb653,'type':_0x5530a8?.[_0x2700e2(0x133)]}),_0x2700e2(0xff)===_0x2cb653&&this[_0x2700e2(0x13e)]();}[_0x39d083(0x135)](_0x28b03,_0x411756){const _0x11c8ef=_0x39d083;if(this[_0x11c8ef(0xd1)][_0x11c8ef(0x149)](_0x28b03[_0x11c8ef(0xfa)])&&(this[_0x11c8ef(0xd1)][_0x11c8ef(0x13c)](_0x28b03[_0x11c8ef(0xfa)],_0x28b03),this[_0x11c8ef(0x151)](_0x11c8ef(0x15b),{'contextItem':_0x28b03,'isLoading':_0x411756}),_0x28b03[_0x11c8ef(0xf5)])){const _0x34cae3=this[_0x11c8ef(0xde)](_0x28b03[_0x11c8ef(0xf5)]);_0x34cae3&&_0x34cae3[_0x11c8ef(0xe4)](_0x414030=>{const _0x277db4=_0x11c8ef;this[_0x277db4(0xd5)](_0x414030,_0x28b03[_0x277db4(0xf5)],!0x0);});}}[_0x39d083(0x158)](_0x6feb3c){const _0x51ac74=_0x39d083;this[_0x51ac74(0x11e)][_0x51ac74(0x13c)](_0x6feb3c[_0x51ac74(0xfa)],_0x6feb3c);}[_0x39d083(0xe3)](){const _0x38d264=_0x39d083;this[_0x38d264(0x130)]={'document':{'enabled':!0x1!==this[_0x38d264(0x11a)]?.[_0x38d264(0xd4)]?.[_0x38d264(0xd9)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x38d264(0x11a)]?.[_0x38d264(0xd2)]?.[_0x38d264(0xd9)]},'files':{'enabled':!0x1!==this[_0x38d264(0x11a)]?.[_0x38d264(0x14c)]?.[_0x38d264(0xd9)]},'sources':this[_0x38d264(0x136)](),'customItems':this[_0x38d264(0x11a)]?.[_0x38d264(0x153)]?.[_0x38d264(0x109)](_0x2de8d0=>({..._0x2de8d0,'enabled':!0x0}))??[]},this[_0x38d264(0x151)](_0x38d264(0x142),{'options':this[_0x38d264(0x130)]});}[_0x39d083(0x136)](){const _0x3a1480=_0x39d083;return this[_0x3a1480(0x11a)]?.[_0x3a1480(0x155)]?.[_0x3a1480(0x109)](_0x25d265=>({..._0x25d265,'resources':[]}))??[];}[_0x39d083(0x13e)](){const _0x178f5c=_0x39d083,_0xcb0bc0=this[_0x178f5c(0x150)]()||this[_0x178f5c(0x122)]();this[_0x178f5c(0x130)][_0x178f5c(0xd4)][_0x178f5c(0xf2)]=_0xcb0bc0,this[_0x178f5c(0x151)](_0x178f5c(0x142),{'options':this[_0x178f5c(0x130)]});}[_0x39d083(0xee)](_0x59b5bf){const _0x5c633b=_0x39d083;for(const _0x1432ed of this[_0x5c633b(0xd1)][_0x5c633b(0xe1)]())if(_0x1432ed[_0x5c633b(0xf5)]===_0x59b5bf)return!0x0;for(const _0x36acdb of this[_0x5c633b(0x11e)][_0x5c633b(0xe1)]())if(_0x36acdb[_0x5c633b(0xf5)]===_0x59b5bf)return!0x0;return!0x1;}[_0x39d083(0xde)](_0x402e48){const _0xbf9320=_0x39d083,_0x204c00=[];for(const _0x4ec206 of this[_0xbf9320(0x130)][_0xbf9320(0x155)]){_0x4ec206[_0xbf9320(0xe5)][_0xbf9320(0x112)](_0x1c1f5c=>_0x1c1f5c['id']===_0x402e48)&&_0x204c00[_0xbf9320(0xf6)](_0x4ec206['id']);}return 0x0===_0x204c00[_0xbf9320(0x104)]?null:_0x204c00;}[_0x39d083(0xd5)](_0x5c3c1d,_0x4bcabe,_0x38f388){const _0x3fbf52=_0x39d083,_0x493af6=this[_0x3fbf52(0x130)][_0x3fbf52(0x155)][_0x3fbf52(0x112)](_0x410723=>_0x410723['id']===_0x5c3c1d);if(!_0x493af6)return;const _0x4af7ff=_0x493af6[_0x3fbf52(0xe5)][_0x3fbf52(0x112)](_0x551f62=>_0x551f62['id']===_0x4bcabe);_0x4af7ff&&(_0x4af7ff[_0x3fbf52(0xf7)]=_0x38f388,this[_0x3fbf52(0x151)](_0x3fbf52(0x129),{'sourceId':_0x5c3c1d,'resourceId':_0x4bcabe,'isInContext':_0x38f388}));}[_0x39d083(0xd7)](_0x5c221a){const _0x841ebb=_0x39d083;this[_0x841ebb(0x113)][_0x841ebb(0x13c)](_0x5c221a,!0x0),this[_0x841ebb(0x113)][_0x841ebb(0x139)]&&this[_0x841ebb(0x151)](_0x841ebb(0x15f),{'isUploadInProgress':!0x0});}[_0x39d083(0xfb)](_0x24e926){const _0x39fa31=_0x39d083;this[_0x39fa31(0x113)][_0x39fa31(0x15e)](_0x24e926),0x0===this[_0x39fa31(0x113)][_0x39fa31(0x139)]&&this[_0x39fa31(0x151)](_0x39fa31(0x15f),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x149bcd=_0x188b;(function(_0x3b7ef0,_0x394d4e){const _0x1f10c6=_0x188b,_0x41f9b0=_0x3b7ef0();while(!![]){try{const _0x3574af=parseInt(_0x1f10c6(0xdb))/0x1*(-parseInt(_0x1f10c6(0xa1))/0x2)+-parseInt(_0x1f10c6(0xc9))/0x3*(parseInt(_0x1f10c6(0x8b))/0x4)+parseInt(_0x1f10c6(0xbd))/0x5+-parseInt(_0x1f10c6(0x74))/0x6*(parseInt(_0x1f10c6(0x8f))/0x7)+parseInt(_0x1f10c6(0xb2))/0x8+-parseInt(_0x1f10c6(0x9d))/0x9+-parseInt(_0x1f10c6(0xe4))/0xa*(-parseInt(_0x1f10c6(0x80))/0xb);if(_0x3574af===_0x394d4e)break;else _0x41f9b0['push'](_0x41f9b0['shift']());}catch(_0x59d1c2){_0x41f9b0['push'](_0x41f9b0['shift']());}}}(_0x42a0,0x83f25));import{CKEditorError as _0x3c69b2,EmitterMixin as _0x29a54f,logWarning as _0x449db2}from'ckeditor5/src/utils.js';function _0x188b(_0x193783,_0x9af1ae){const _0x42a01e=_0x42a0();return _0x188b=function(_0x188b82,_0x421e3e){_0x188b82=_0x188b82-0x66;let _0x2624a8=_0x42a01e[_0x188b82];return _0x2624a8;},_0x188b(_0x193783,_0x9af1ae);}import{AI_MODEL_EVENT_NAMES as _0x16ee8e}from'../../aicore/model/aiinteraction.js';function _0x42a0(){const _0xa80c99=['1500135ZwxrPe','attributes','ai-chat-handle-user-interaction-already-in-progress','getPendingContextItems','url','loadSourceResources','getInteraction','modelSelected','hasOwn','chatModels','assistant','ai-chat-conversation-init-failed','sources','destroy','get','getModel','getAll','startConversation','1obzdPY','load','stop','conversationInitialized','getCapabilitiesConfig','removeSelectionFromContext','ai-chat-conversation-set-model-null','ai-chat-handle-user-interaction-start-failed','removeInteraction','1244260VEsMrS','setModel','updateCurrentDocument','find','isFromHistory','removeFromContext','code','ai-chat-conversation-set-model-not-available','prompt','appendContent','createInteraction','addResourceToContext','user','ai-chat-handle-user-conversation-not-initialized','content','4157292yCrWfy','type','_extractContextItems','addToConversationContext','capabilities','toLowerCase','delegate','getDocumentContext','interactionCreated','reasoning','role','message','198dKRbzV','chatCapabilities','addFilesToContext','splice','isAvailable','setReasoning','model','fire','getConversation','createReply','title','4PltBiZ','getEditor','_handleToolResultData','selectedModelId','7VXtUly','handleUserInteraction','populateFromMessage','lastInteraction','getCurrentDocumentContext','stack','conversationStarted','chatContext','contextItems','interactions','updateCurrentDocumentInContext','currentInteraction','fetchConversationMessages','webSearch','7827156fqyBck','modification','ai-chat-conversation-already-started','ai-chat-conversation-init-from-id-failed','1558936PtyMTk','isSelectionInContext','conversationId','text','start','push','group','addCurrentDocumentToContext','parse','addUrlToContext','isCurrentDocumentInConversation','setConversationTitle','setWebSearch','fetchConversation','getAvailableModels','isCurrentDocumentInContext','error','1026528nVKUIS','reset','options','ai-chat-conversation-start-failed','indexOf','connector','getMessages','toggleWebSearch','toolName','sessionId','init','5072740JFdOGy','mcp-tool-result','currentReply','length','_processMessagesToInteractions','ai-chat-conversation-start-no-model-selected','addToolItemToContext','addSelectionToContext','isStarted','selectedModel','toggleReasoning','set'];_0x42a0=function(){return _0xa80c99;};return _0x42a0();}import{AIChatContext as _0x13f61c,AI_CONTEXT_MODEL_EVENT_NAMES as _0x12633b}from'./aichatcontext.js';import{AICapabilities as _0x26241c,CAPABILITIES_MODEL_EVENT_NAMES as _0x576033}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x1016a4}from'./aichatinteraction.js';import{errorsMap as _0x5eb07}from'../../errorsmap.js';export class AIChatConversation extends _0x29a54f(){['id'];[_0x149bcd(0xc5)]=!0x1;[_0x149bcd(0x69)];[_0x149bcd(0x98)]=[];[_0x149bcd(0x9a)];[_0x149bcd(0xc6)];[_0x149bcd(0xb7)];[_0x149bcd(0xb4)];constructor(_0x139668){const _0xe1357a=_0x149bcd;super(),this[_0xe1357a(0xb4)]=_0x139668,this[_0xe1357a(0xb7)]=_0x139668[_0xe1357a(0xb7)],this[_0xe1357a(0xd2)]=_0x139668[_0xe1357a(0xd2)],this['id']=_0x139668[_0xe1357a(0xa3)],this[_0xe1357a(0x69)]=_0x139668[_0xe1357a(0x69)];}async[_0x149bcd(0xbc)](_0x249492){const _0x466e0a=_0x149bcd;try{this[_0x466e0a(0x96)]=new _0x13f61c({'connector':this[_0x466e0a(0xb7)],'config':_0x249492,'ownerId':this['id']}),this[_0x466e0a(0x96)][_0x466e0a(0x7a)](..._0x12633b)['to'](this),this[_0x466e0a(0x96)][_0x466e0a(0xbc)](),this[_0x466e0a(0x81)]=new _0x26241c(),this[_0x466e0a(0x81)][_0x466e0a(0x7a)](..._0x576033)['to'](this),this[_0x466e0a(0x81)][_0x466e0a(0xbc)]();const _0x3b3e1d=await this[_0x466e0a(0xd2)][_0x466e0a(0xaf)]();this[_0x466e0a(0x87)](_0x466e0a(0xde),{'availableModels':_0x3b3e1d});const _0x92e3b7=await this[_0x466e0a(0xd2)][_0x466e0a(0xd8)](this[_0x466e0a(0xb4)][_0x466e0a(0x8e)]);_0x92e3b7&&await this[_0x466e0a(0x66)](_0x92e3b7);}catch(_0x15831d){const _0x2b01fa=new _0x3c69b2(_0x466e0a(0xd4),null,{'message':_0x15831d[_0x466e0a(0x7f)]||_0x15831d});_0x2b01fa[_0x466e0a(0x94)]=_0x15831d[_0x466e0a(0x94)],this[_0x466e0a(0x87)](_0x466e0a(0xb1),{'error':_0x2b01fa});}}async[_0x149bcd(0xa5)](){const _0x22a6a9=_0x149bcd;if(this[_0x22a6a9(0xc5)])throw new _0x3c69b2(_0x22a6a9(0x9f),null,{'conversation':this});if(!this[_0x22a6a9(0xc6)])throw new _0x3c69b2(_0x22a6a9(0xc2),null,{'conversation':this});try{const {id:_0x5b78db}=await this[_0x22a6a9(0xb7)][_0x22a6a9(0xda)](this['id'],this[_0x22a6a9(0xb4)][_0x22a6a9(0xa7)])[_0x22a6a9(0x88)]();this['id']=_0x5b78db,this[_0x22a6a9(0xc5)]=!0x0,this[_0x22a6a9(0x87)](_0x22a6a9(0x95),{'conversationId':this['id'],'selectedModel':this[_0x22a6a9(0xc6)]});}catch(_0x3892c2){const _0x214b43=new _0x3c69b2(_0x22a6a9(0xb5),null,{'message':_0x3892c2[_0x22a6a9(0x7f)],'conversationId':this['id']});throw _0x214b43[_0x22a6a9(0x94)]=_0x3892c2[_0x22a6a9(0x94)],this[_0x22a6a9(0x87)](_0x22a6a9(0xb1),{'error':_0x214b43}),_0x214b43;}}async[_0x149bcd(0xdc)](_0x42480c,_0x4e9706){const _0x5acbd9=_0x149bcd;try{const _0xe6a841=await this[_0x5acbd9(0xb7)][_0x5acbd9(0xae)](_0x42480c)[_0x5acbd9(0x88)](),_0xa95ff9=await this[_0x5acbd9(0xb7)][_0x5acbd9(0x9b)](_0x42480c)[_0x5acbd9(0xb8)](),_0x5ec5e4=_0xa95ff9[0x0][_0x5acbd9(0x86)];this[_0x5acbd9(0xc5)]=!0x0,this['id']=_0xe6a841['id'],_0x5acbd9(0x8a)in _0xe6a841?this[_0x5acbd9(0x87)](_0x5acbd9(0xac),_0xe6a841[_0x5acbd9(0x8a)],!0x0):this[_0x5acbd9(0x87)](_0x5acbd9(0xac),'',!0x0);const _0x5c6037=(await this[_0x5acbd9(0xd2)][_0x5acbd9(0xd9)]())[_0x5acbd9(0x68)](_0x264d59=>_0x264d59['id'][_0x5acbd9(0x79)]()===_0x5ec5e4[_0x5acbd9(0x79)]());return this[_0x5acbd9(0xc6)]=_0x5c6037,this[_0x5acbd9(0x87)](_0x5acbd9(0xd0),{'selectedModel':_0x5c6037,'isDisabled':!0x0}),await this[_0x5acbd9(0xc1)](_0xa95ff9,_0x4e9706,_0x5ec5e4),this[_0x5acbd9(0x9a)]=void 0x0,this;}catch(_0x717b23){const _0x4378df=new _0x3c69b2(_0x5acbd9(0xa0),null,{'message':_0x717b23[_0x5acbd9(0x7f)],'conversationId':_0x42480c});throw _0x4378df[_0x5acbd9(0x94)]=_0x717b23[_0x5acbd9(0x94)],this[_0x5acbd9(0x87)](_0x5acbd9(0xb1),{'error':_0x4378df}),_0x4378df;}}async[_0x149bcd(0xc1)](_0x1ec5e4,_0x25196d,_0x291e52){const _0xc4ba63=_0x149bcd;let _0x4be764;for(const _0x7c1058 of _0x1ec5e4)if(_0xc4ba63(0x71)===_0x7c1058[_0xc4ba63(0x7e)]){const _0x186f08=await this[_0xc4ba63(0x76)](_0x7c1058),_0x3cc5d1={'isReasoningEnabled':Object[_0xc4ba63(0xd1)](_0x7c1058[_0xc4ba63(0x78)],_0xc4ba63(0x7d)),'isWebSearchEnabled':Object[_0xc4ba63(0xd1)](_0x7c1058[_0xc4ba63(0x78)],_0xc4ba63(0x9c))};_0x4be764=this[_0xc4ba63(0x6f)]({'userMessage':_0x7c1058[_0xc4ba63(0x6d)],'contextItems':_0x186f08,'capabilities':_0x3cc5d1,'modelId':_0x291e52,'attributes':_0x7c1058[_0xc4ba63(0xca)]}),this[_0xc4ba63(0x9a)]=_0x4be764,this[_0xc4ba63(0x96)][_0xc4ba63(0x77)](this[_0xc4ba63(0x9a)][_0xc4ba63(0x97)]);}else{if(_0xc4ba63(0xd3)===_0x7c1058[_0xc4ba63(0x7e)]&&_0x4be764){const _0x396a45=[];for(const _0x181b70 of _0x7c1058[_0xc4ba63(0x73)])switch(_0x181b70[_0xc4ba63(0x75)]){case _0xc4ba63(0xa4):case _0xc4ba63(0x9e):{const _0x5c81e7=_0x4be764[_0xc4ba63(0x7b)]()?.[_0xc4ba63(0xbb)]!==_0x25196d;_0x4be764[_0xc4ba63(0xbf)]=_0x4be764[_0xc4ba63(0x89)]({'type':_0x181b70[_0xc4ba63(0x75)],'isDone':!0x0,'interactionId':_0x4be764['id'],'areActionsDisabled':_0x5c81e7}),_0x4be764[_0xc4ba63(0xbf)][_0xc4ba63(0x6e)](_0x181b70[_0xc4ba63(0x73)]),_0x396a45[_0xc4ba63(0xc0)]>0x0&&(_0x4be764[_0xc4ba63(0xbf)][_0xc4ba63(0xd5)]=_0x396a45[_0xc4ba63(0x83)](0x0));break;}case _0xc4ba63(0xcd):_0x396a45[_0xc4ba63(0xa6)](_0x181b70);break;case _0xc4ba63(0xbe):{const {data:_0x3af3e5,attributes:_0x4bc21d}=JSON[_0xc4ba63(0xa9)](_0x181b70[_0xc4ba63(0x73)]);_0x4be764[_0xc4ba63(0x8d)]({'toolName':_0x181b70[_0xc4ba63(0xba)],'data':_0x3af3e5,'attributes':_0x4bc21d});break;}}}}}async[_0x149bcd(0x76)](_0x30fc4c){const _0x584a91=_0x149bcd,_0x5da555=new Map();if(!_0x30fc4c[_0x584a91(0x73)])return _0x5da555;for(const _0x3085ad of _0x30fc4c[_0x584a91(0x73)]){const _0x463b4e=await this[_0x584a91(0x96)][_0x584a91(0x91)](_0x3085ad);_0x463b4e&&_0x5da555[_0x584a91(0xc8)](_0x463b4e['id'],_0x463b4e);}return _0x5da555;}async[_0x149bcd(0x90)]({userMessage:_0x45d8be,attributes:_0x37fd1e}){const _0x508ce8=_0x149bcd;if(!this[_0x508ce8(0xc5)])throw new _0x3c69b2(_0x508ce8(0x72),null,{'conversation':this});if(this[_0x508ce8(0x9a)])throw new _0x3c69b2(_0x508ce8(0xcb),null,{'conversation':this});try{const _0x5e1a0f=this[_0x508ce8(0x96)][_0x508ce8(0xcc)](),_0x379baf=this[_0x508ce8(0x81)][_0x508ce8(0xdf)](),_0x169522=this[_0x508ce8(0xc6)]['id'];this[_0x508ce8(0x9a)]=this[_0x508ce8(0x6f)]({'userMessage':_0x45d8be,'contextItems':_0x5e1a0f,'capabilities':_0x379baf,'modelId':_0x169522,'attributes':_0x37fd1e}),await this[_0x508ce8(0x9a)][_0x508ce8(0xa5)](),this[_0x508ce8(0x96)][_0x508ce8(0x77)](this[_0x508ce8(0x9a)][_0x508ce8(0x97)]);}catch(_0x52e032){if(_0x52e032 instanceof _0x3c69b2)this[_0x508ce8(0x87)](_0x508ce8(0xb1),{'interactionId':this[_0x508ce8(0x9a)]?this[_0x508ce8(0x9a)]['id']:void 0x0,'error':_0x52e032});else{const _0x59e5e5=_0x5eb07[_0x508ce8(0xd7)](_0x52e032[_0x508ce8(0x6b)])||_0x508ce8(0xe2);this[_0x508ce8(0x87)](_0x508ce8(0xb1),{'interactionId':this[_0x508ce8(0x9a)]?this[_0x508ce8(0x9a)]['id']:void 0x0,'error':new _0x3c69b2(_0x59e5e5,null,{'error':_0x52e032})});}}finally{this[_0x508ce8(0x9a)]?.[_0x508ce8(0xdd)](),this[_0x508ce8(0x9a)]=void 0x0;}}[_0x149bcd(0x6f)]({userMessage:_0xe3e1e8,contextItems:_0xbdda0e,capabilities:_0x4fcbe4,modelId:_0x1d0763,attributes:_0x37093a}){const _0x4e9f1a=_0x149bcd,_0x5b50e1=new _0x1016a4({'userMessage':_0xe3e1e8,'contextItems':_0xbdda0e,'capabilities':_0x4fcbe4,'conversationId':this['id'],'connector':this[_0x4e9f1a(0xb7)],'editor':this[_0x4e9f1a(0xb4)][_0x4e9f1a(0x8c)]&&this[_0x4e9f1a(0xb4)][_0x4e9f1a(0x8c)](),'model':_0x1d0763,'attributes':_0x37093a});return _0x5b50e1[_0x4e9f1a(0x7a)](..._0x16ee8e)['to'](this),this[_0x4e9f1a(0x98)][_0x4e9f1a(0xa6)](_0x5b50e1),this[_0x4e9f1a(0x87)](_0x4e9f1a(0x7c),_0x5b50e1),_0x5b50e1;}[_0x149bcd(0xcf)](_0x2ffe64){const _0x23dcd6=_0x149bcd;return this[_0x23dcd6(0x98)][_0x23dcd6(0x68)](_0x1888df=>_0x1888df['id']===_0x2ffe64);}[_0x149bcd(0xe3)](_0x318934){const _0x9bd664=_0x149bcd,_0x3a9dbd=this[_0x9bd664(0xcf)](_0x318934);_0x3a9dbd&&(_0x3a9dbd[_0x9bd664(0xd6)](),this[_0x9bd664(0x98)][_0x9bd664(0x83)](this[_0x9bd664(0x98)][_0x9bd664(0xb6)](_0x3a9dbd),0x1));}get[_0x149bcd(0x92)](){const _0x15d4ba=_0x149bcd;return this[_0x15d4ba(0x98)][this[_0x15d4ba(0x98)][_0x15d4ba(0xc0)]-0x1];}[_0x149bcd(0xa8)](_0x2af59c){const _0xb71adb=_0x149bcd;this[_0xb71adb(0x96)][_0xb71adb(0xa8)](_0x2af59c);}async[_0x149bcd(0x99)]({content:_0x398ec8,version:_0x54a6d5,sessionId:_0x162d79,selections:_0x50a3d8}){const _0x1ccd7c=_0x149bcd;await this[_0x1ccd7c(0x96)][_0x1ccd7c(0x67)](_0x398ec8,_0x54a6d5,_0x162d79,_0x50a3d8);}[_0x149bcd(0x93)](){const _0x2d9f12=_0x149bcd;return this[_0x2d9f12(0x9a)]?.[_0x2d9f12(0x7b)]()?.[_0x2d9f12(0x73)]||'';}[_0x149bcd(0xc4)](_0x1a5d7c){const _0x5a5788=_0x149bcd;this[_0x5a5788(0x96)][_0x5a5788(0xc4)](_0x1a5d7c);}[_0x149bcd(0xe0)](){const _0x196b8a=_0x149bcd;this[_0x196b8a(0x96)][_0x196b8a(0xe0)]();}[_0x149bcd(0x82)](_0x3d4b2f){const _0x470a60=_0x149bcd;this[_0x470a60(0x96)][_0x470a60(0x82)](_0x3d4b2f);}[_0x149bcd(0xaa)](_0x4aed1f){const _0x2bd394=_0x149bcd;this[_0x2bd394(0x96)][_0x2bd394(0xaa)](_0x4aed1f);}[_0x149bcd(0xc3)](_0x3d2c7d){const _0x33b140=_0x149bcd;this[_0x33b140(0x96)][_0x33b140(0xc3)](_0x3d2c7d);}[_0x149bcd(0x70)](_0x3e9ca6,_0x22a435){const _0x47b841=_0x149bcd;this[_0x47b841(0x96)][_0x47b841(0x70)](_0x3e9ca6,_0x22a435);}[_0x149bcd(0xce)](_0x12957c,_0x5467e1,_0x5f583c){const _0x1f23ba=_0x149bcd;return this[_0x1f23ba(0x96)][_0x1f23ba(0xce)](_0x12957c,_0x5467e1,_0x5f583c);}[_0x149bcd(0x6a)](_0x2015bb){const _0x10da80=_0x149bcd;this[_0x10da80(0x96)][_0x10da80(0x6a)](_0x2015bb);}[_0x149bcd(0xad)](_0x1773e9){const _0x32dd2=_0x149bcd;this[_0x32dd2(0x81)][_0x32dd2(0xad)](_0x1773e9);}[_0x149bcd(0xb9)](){const _0x3afdcf=_0x149bcd;this[_0x3afdcf(0x81)][_0x3afdcf(0xb9)]();}[_0x149bcd(0x85)](_0x95f310){const _0x136df4=_0x149bcd;this[_0x136df4(0x81)][_0x136df4(0x85)](_0x95f310);}[_0x149bcd(0xc7)](){const _0x249740=_0x149bcd;this[_0x249740(0x81)][_0x249740(0xc7)]();}[_0x149bcd(0xb0)](){const _0x24f673=_0x149bcd;return this[_0x24f673(0x96)][_0x24f673(0xb0)]();}[_0x149bcd(0xab)](){const _0x51cbd7=_0x149bcd;return this[_0x51cbd7(0x96)][_0x51cbd7(0xab)]();}[_0x149bcd(0xa2)](){const _0x2b0ba4=_0x149bcd;return this[_0x2b0ba4(0x96)][_0x2b0ba4(0xa2)]();}async[_0x149bcd(0x66)](_0x29de59){const _0x1bacbe=_0x149bcd;_0x29de59?!0x1===await this[_0x1bacbe(0xd2)][_0x1bacbe(0x84)](_0x29de59)&&(_0x449db2(_0x1bacbe(0x6c),{'conversation':this,'model':_0x29de59}),_0x29de59=(await this[_0x1bacbe(0xd2)][_0x1bacbe(0xaf)]())[0x0]):(_0x449db2(_0x1bacbe(0xe1),{'conversation':this}),_0x29de59=(await this[_0x1bacbe(0xd2)][_0x1bacbe(0xaf)]())[0x0]),_0x29de59['id']!==this[_0x1bacbe(0xc6)]?.['id']&&(this[_0x1bacbe(0xc6)]=_0x29de59,this[_0x1bacbe(0x81)][_0x1bacbe(0xb3)](),this[_0x1bacbe(0x87)](_0x1bacbe(0xd0),{'selectedModel':_0x29de59}));}}
23
+ const _0x4ef92b=_0x5125;function _0x1ed4(){const _0x485fc4=['modelSelected','getConversation','capabilities','interactionCreated','reasoning','updateCurrentDocumentInContext','content','1757hYnUQI','_processMessagesToInteractions','conversationInitialized','code','selectedModel','getMessages','_extractContextItems','addSelectionToContext','contextItems','selectedModelId','delegate','setReasoning','url','text','parse','setConversationTitle','ai-chat-conversation-start-no-model-selected','handleUserInteraction','currentInteraction','stop','updateCurrentDocument','getInteraction','push','loadSourceResources','populateFromMessage','fetchConversationMessages','indexOf','model','isCurrentDocumentInContext','splice','getPendingContextItems','setWebSearch','isCurrentDocumentInConversation','createReply','16268wAPSJb','ai-chat-conversation-set-model-null','sources','modification','get','chatContext','group','user','type','createInteraction','3361110VfvZUE','201ydAjqE','addToolItemToContext','addResourceToContext','addFilesToContext','isStarted','getEditor','chatCapabilities','removeFromContext','webSearch','993194ljUUsX','229289ByEBOg','chatModels','fetchConversation','ai-chat-handle-user-interaction-start-failed','toLowerCase','ai-chat-conversation-init-failed','hasOwn','9kQpqch','toggleWebSearch','ai-chat-conversation-already-started','error','length','setModel','ai-chat-conversation-start-failed','conversationStarted','getAvailableModels','ai-chat-conversation-set-model-not-available','toggleReasoning','isSelectionInContext','options','reset','_handleToolResultData','stack','load','getModel','isFromHistory','attributes','addCurrentDocumentToContext','isAvailable','title','10oYUVjI','752682ylfoXn','ai-chat-handle-user-interaction-already-in-progress','set','fire','getCurrentDocumentContext','ai-chat-conversation-init-from-id-failed','appendContent','addToConversationContext','toolName','7906899JyRIXF','getCapabilitiesConfig','assistant','prompt','conversationId','init','ai-chat-handle-user-conversation-not-initialized','lastInteraction','message','start','addUrlToContext','getDocumentContext','12184iumYeS','startConversation','getAll','interactions','sessionId','destroy','role','removeInteraction','mcp-tool-result','removeSelectionFromContext','connector','currentReply','find'];_0x1ed4=function(){return _0x485fc4;};return _0x1ed4();}(function(_0x120d03,_0x1b2dd3){const _0x5e42e8=_0x5125,_0x4ac867=_0x120d03();while(!![]){try{const _0x40f37b=-parseInt(_0x5e42e8(0x18b))/0x1+parseInt(_0x5e42e8(0x18a))/0x2+parseInt(_0x5e42e8(0x181))/0x3*(-parseInt(_0x5e42e8(0x176))/0x4)+parseInt(_0x5e42e8(0x12a))/0x5*(-parseInt(_0x5e42e8(0x12b))/0x6)+-parseInt(_0x5e42e8(0x154))/0x7*(parseInt(_0x5e42e8(0x140))/0x8)+-parseInt(_0x5e42e8(0x192))/0x9*(-parseInt(_0x5e42e8(0x180))/0xa)+parseInt(_0x5e42e8(0x134))/0xb;if(_0x40f37b===_0x1b2dd3)break;else _0x4ac867['push'](_0x4ac867['shift']());}catch(_0x2564d5){_0x4ac867['push'](_0x4ac867['shift']());}}}(_0x1ed4,0x65b3c));import{CKEditorError as _0x31036f,EmitterMixin as _0x25b025,logWarning as _0x4d048b}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x4622d7}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1def19,AI_CONTEXT_MODEL_EVENT_NAMES as _0x5a2007}from'./aichatcontext.js';function _0x5125(_0x14ff54,_0x1632c0){const _0x1ed439=_0x1ed4();return _0x5125=function(_0x5125ab,_0x3d8e7d){_0x5125ab=_0x5125ab-0x126;let _0x3b6a14=_0x1ed439[_0x5125ab];return _0x3b6a14;},_0x5125(_0x14ff54,_0x1632c0);}import{AICapabilities as _0x1ed995,CAPABILITIES_MODEL_EVENT_NAMES as _0x5c0ecd}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x426121}from'./aichatinteraction.js';import{errorsMap as _0x38637f}from'../../errorsmap.js';export class AIChatConversation extends _0x25b025(){['id'];[_0x4ef92b(0x185)]=!0x1;[_0x4ef92b(0x1a4)];[_0x4ef92b(0x143)]=[];[_0x4ef92b(0x166)];[_0x4ef92b(0x158)];[_0x4ef92b(0x14a)];[_0x4ef92b(0x19e)];constructor(_0x599e42){const _0x41b2c2=_0x4ef92b;super(),this[_0x41b2c2(0x19e)]=_0x599e42,this[_0x41b2c2(0x14a)]=_0x599e42[_0x41b2c2(0x14a)],this[_0x41b2c2(0x18c)]=_0x599e42[_0x41b2c2(0x18c)],this['id']=_0x599e42[_0x41b2c2(0x138)],this[_0x41b2c2(0x1a4)]=_0x599e42[_0x41b2c2(0x1a4)];}async[_0x4ef92b(0x139)](_0x3bd7d1){const _0x130e31=_0x4ef92b;try{this[_0x130e31(0x17b)]=new _0x1def19({'connector':this[_0x130e31(0x14a)],'config':_0x3bd7d1,'ownerId':this['id']}),this[_0x130e31(0x17b)][_0x130e31(0x15e)](..._0x5a2007)['to'](this),this[_0x130e31(0x17b)][_0x130e31(0x139)](),this[_0x130e31(0x187)]=new _0x1ed995(),this[_0x130e31(0x187)][_0x130e31(0x15e)](..._0x5c0ecd)['to'](this),this[_0x130e31(0x187)][_0x130e31(0x139)]();const _0x18b62f=await this[_0x130e31(0x18c)][_0x130e31(0x19a)]();this[_0x130e31(0x12e)](_0x130e31(0x156),{'availableModels':_0x18b62f});const _0x5ef63e=await this[_0x130e31(0x18c)][_0x130e31(0x1a3)](this[_0x130e31(0x19e)][_0x130e31(0x15d)]);_0x5ef63e&&await this[_0x130e31(0x197)](_0x5ef63e);}catch(_0x1676e6){const _0x48a1e1=new _0x31036f(_0x130e31(0x190),null,{'message':_0x1676e6[_0x130e31(0x13c)]||_0x1676e6});_0x48a1e1[_0x130e31(0x1a1)]=_0x1676e6[_0x130e31(0x1a1)],this[_0x130e31(0x12e)](_0x130e31(0x195),{'error':_0x48a1e1});}}async[_0x4ef92b(0x13d)](){const _0x3d765b=_0x4ef92b;if(this[_0x3d765b(0x185)])throw new _0x31036f(_0x3d765b(0x194),null,{'conversation':this});if(!this[_0x3d765b(0x158)])throw new _0x31036f(_0x3d765b(0x164),null,{'conversation':this});try{const {id:_0x55befe}=await this[_0x3d765b(0x14a)][_0x3d765b(0x141)](this['id'],this[_0x3d765b(0x19e)][_0x3d765b(0x17c)])[_0x3d765b(0x14e)]();this['id']=_0x55befe,this[_0x3d765b(0x185)]=!0x0,this[_0x3d765b(0x12e)](_0x3d765b(0x199),{'conversationId':this['id'],'selectedModel':this[_0x3d765b(0x158)]});}catch(_0x29877d){const _0x378c1b=new _0x31036f(_0x3d765b(0x198),null,{'message':_0x29877d[_0x3d765b(0x13c)],'conversationId':this['id']});throw _0x378c1b[_0x3d765b(0x1a1)]=_0x29877d[_0x3d765b(0x1a1)],this[_0x3d765b(0x12e)](_0x3d765b(0x195),{'error':_0x378c1b}),_0x378c1b;}}async[_0x4ef92b(0x1a2)](_0x5293bb,_0x56b7b0){const _0x35a2cb=_0x4ef92b;try{const _0x539ed1=await this[_0x35a2cb(0x14a)][_0x35a2cb(0x18d)](_0x5293bb)[_0x35a2cb(0x14e)](),_0x3be685=await this[_0x35a2cb(0x14a)][_0x35a2cb(0x16d)](_0x5293bb)[_0x35a2cb(0x159)](),_0x15744d=_0x3be685[0x0][_0x35a2cb(0x16f)];this[_0x35a2cb(0x185)]=!0x0,this['id']=_0x539ed1['id'],_0x35a2cb(0x129)in _0x539ed1?this[_0x35a2cb(0x12e)](_0x35a2cb(0x163),_0x539ed1[_0x35a2cb(0x129)],!0x0):this[_0x35a2cb(0x12e)](_0x35a2cb(0x163),'',!0x0);const _0x55c30e=(await this[_0x35a2cb(0x18c)][_0x35a2cb(0x142)]())[_0x35a2cb(0x14c)](_0xcac2be=>_0xcac2be['id'][_0x35a2cb(0x18f)]()===_0x15744d[_0x35a2cb(0x18f)]());return this[_0x35a2cb(0x158)]=_0x55c30e,this[_0x35a2cb(0x12e)](_0x35a2cb(0x14d),{'selectedModel':_0x55c30e,'isDisabled':!0x0}),await this[_0x35a2cb(0x155)](_0x3be685,_0x56b7b0,_0x15744d),this[_0x35a2cb(0x166)]=void 0x0,this;}catch(_0x4dd907){const _0x3bcf9e=new _0x31036f(_0x35a2cb(0x130),null,{'message':_0x4dd907[_0x35a2cb(0x13c)],'conversationId':_0x5293bb});throw _0x3bcf9e[_0x35a2cb(0x1a1)]=_0x4dd907[_0x35a2cb(0x1a1)],this[_0x35a2cb(0x12e)](_0x35a2cb(0x195),{'error':_0x3bcf9e}),_0x3bcf9e;}}async[_0x4ef92b(0x155)](_0x4ca9f5,_0x2b92e4,_0x710200){const _0x51d5c0=_0x4ef92b;let _0x38a193;for(const _0x459b85 of _0x4ca9f5)if(_0x51d5c0(0x17d)===_0x459b85[_0x51d5c0(0x146)]){const _0x122b4f=await this[_0x51d5c0(0x15a)](_0x459b85),_0x39574a={'isReasoningEnabled':Object[_0x51d5c0(0x191)](_0x459b85[_0x51d5c0(0x14f)],_0x51d5c0(0x151)),'isWebSearchEnabled':Object[_0x51d5c0(0x191)](_0x459b85[_0x51d5c0(0x14f)],_0x51d5c0(0x189))};_0x38a193=this[_0x51d5c0(0x17f)]({'userMessage':_0x459b85[_0x51d5c0(0x137)],'contextItems':_0x122b4f,'capabilities':_0x39574a,'modelId':_0x710200,'attributes':_0x459b85[_0x51d5c0(0x126)]}),this[_0x51d5c0(0x166)]=_0x38a193,this[_0x51d5c0(0x17b)][_0x51d5c0(0x132)](this[_0x51d5c0(0x166)][_0x51d5c0(0x15c)]);}else{if(_0x51d5c0(0x136)===_0x459b85[_0x51d5c0(0x146)]&&_0x38a193){const _0x577c27=[];for(const _0x58a656 of _0x459b85[_0x51d5c0(0x153)])switch(_0x58a656[_0x51d5c0(0x17e)]){case _0x51d5c0(0x161):case _0x51d5c0(0x179):{const _0x19cdcc=_0x38a193[_0x51d5c0(0x13f)]()?.[_0x51d5c0(0x144)]!==_0x2b92e4;_0x38a193[_0x51d5c0(0x14b)]=_0x38a193[_0x51d5c0(0x175)]({'type':_0x58a656[_0x51d5c0(0x17e)],'isDone':!0x0,'interactionId':_0x38a193['id'],'areActionsDisabled':_0x19cdcc}),_0x38a193[_0x51d5c0(0x14b)][_0x51d5c0(0x131)](_0x58a656[_0x51d5c0(0x153)]),_0x577c27[_0x51d5c0(0x196)]>0x0&&(_0x38a193[_0x51d5c0(0x14b)][_0x51d5c0(0x178)]=_0x577c27[_0x51d5c0(0x171)](0x0));break;}case _0x51d5c0(0x160):_0x577c27[_0x51d5c0(0x16a)](_0x58a656);break;case _0x51d5c0(0x148):{const {data:_0x149e22,attributes:_0x38270b}=JSON[_0x51d5c0(0x162)](_0x58a656[_0x51d5c0(0x153)]);_0x38a193[_0x51d5c0(0x1a0)]({'toolName':_0x58a656[_0x51d5c0(0x133)],'data':_0x149e22,'attributes':_0x38270b});break;}}}}}async[_0x4ef92b(0x15a)](_0x5d8845){const _0x2b3d7e=_0x4ef92b,_0x409f22=new Map();if(!_0x5d8845[_0x2b3d7e(0x153)])return _0x409f22;for(const _0x159f3a of _0x5d8845[_0x2b3d7e(0x153)]){const _0x215091=await this[_0x2b3d7e(0x17b)][_0x2b3d7e(0x16c)](_0x159f3a);_0x215091&&_0x409f22[_0x2b3d7e(0x12d)](_0x215091['id'],_0x215091);}return _0x409f22;}async[_0x4ef92b(0x165)]({userMessage:_0x24ea29,attributes:_0x5751fb}){const _0x2c339c=_0x4ef92b;if(!this[_0x2c339c(0x185)])throw new _0x31036f(_0x2c339c(0x13a),null,{'conversation':this});if(this[_0x2c339c(0x166)])throw new _0x31036f(_0x2c339c(0x12c),null,{'conversation':this});try{const _0xccc260=this[_0x2c339c(0x17b)][_0x2c339c(0x172)](),_0x2dcf59=this[_0x2c339c(0x187)][_0x2c339c(0x135)](),_0x8898a1=this[_0x2c339c(0x158)]['id'];this[_0x2c339c(0x166)]=this[_0x2c339c(0x17f)]({'userMessage':_0x24ea29,'contextItems':_0xccc260,'capabilities':_0x2dcf59,'modelId':_0x8898a1,'attributes':_0x5751fb}),await this[_0x2c339c(0x166)][_0x2c339c(0x13d)](),this[_0x2c339c(0x17b)][_0x2c339c(0x132)](this[_0x2c339c(0x166)][_0x2c339c(0x15c)]);}catch(_0xdfbc7){if(_0xdfbc7 instanceof _0x31036f)this[_0x2c339c(0x12e)](_0x2c339c(0x195),{'interactionId':this[_0x2c339c(0x166)]?this[_0x2c339c(0x166)]['id']:void 0x0,'error':_0xdfbc7});else{const _0x3c79e3=_0x38637f[_0x2c339c(0x17a)](_0xdfbc7[_0x2c339c(0x157)])||_0x2c339c(0x18e);this[_0x2c339c(0x12e)](_0x2c339c(0x195),{'interactionId':this[_0x2c339c(0x166)]?this[_0x2c339c(0x166)]['id']:void 0x0,'error':new _0x31036f(_0x3c79e3,null,{'error':_0xdfbc7})});}}finally{this[_0x2c339c(0x166)]?.[_0x2c339c(0x167)](),this[_0x2c339c(0x166)]=void 0x0;}}[_0x4ef92b(0x17f)]({userMessage:_0x215fbb,contextItems:_0x493b22,capabilities:_0x1142f,modelId:_0x4a187e,attributes:_0x57acc4}){const _0x4fbc50=_0x4ef92b,_0x1c2ffa=new _0x426121({'userMessage':_0x215fbb,'contextItems':_0x493b22,'capabilities':_0x1142f,'conversationId':this['id'],'connector':this[_0x4fbc50(0x14a)],'editor':this[_0x4fbc50(0x19e)][_0x4fbc50(0x186)]&&this[_0x4fbc50(0x19e)][_0x4fbc50(0x186)](),'model':_0x4a187e,'attributes':_0x57acc4});return _0x1c2ffa[_0x4fbc50(0x15e)](..._0x4622d7)['to'](this),this[_0x4fbc50(0x143)][_0x4fbc50(0x16a)](_0x1c2ffa),this[_0x4fbc50(0x12e)](_0x4fbc50(0x150),_0x1c2ffa),_0x1c2ffa;}[_0x4ef92b(0x169)](_0xe7ea11){const _0x9d90c2=_0x4ef92b;return this[_0x9d90c2(0x143)][_0x9d90c2(0x14c)](_0x38eeb2=>_0x38eeb2['id']===_0xe7ea11);}[_0x4ef92b(0x147)](_0x18c7e8){const _0x2b8ff8=_0x4ef92b,_0x570b52=this[_0x2b8ff8(0x169)](_0x18c7e8);_0x570b52&&(_0x570b52[_0x2b8ff8(0x145)](),this[_0x2b8ff8(0x143)][_0x2b8ff8(0x171)](this[_0x2b8ff8(0x143)][_0x2b8ff8(0x16e)](_0x570b52),0x1));}get[_0x4ef92b(0x13b)](){const _0x28f59b=_0x4ef92b;return this[_0x28f59b(0x143)][this[_0x28f59b(0x143)][_0x28f59b(0x196)]-0x1];}[_0x4ef92b(0x127)](_0xec6264){const _0x2bb9a7=_0x4ef92b;this[_0x2bb9a7(0x17b)][_0x2bb9a7(0x127)](_0xec6264);}async[_0x4ef92b(0x152)]({content:_0x15091c,version:_0x2ca767,sessionId:_0x3c7a71,selections:_0x36056f}){const _0x3f46b4=_0x4ef92b;await this[_0x3f46b4(0x17b)][_0x3f46b4(0x168)](_0x15091c,_0x2ca767,_0x3c7a71,_0x36056f);}[_0x4ef92b(0x12f)](){const _0x192637=_0x4ef92b;return this[_0x192637(0x166)]?.[_0x192637(0x13f)]()?.[_0x192637(0x153)]||'';}[_0x4ef92b(0x15b)](_0xdb1d4){const _0x3749c3=_0x4ef92b;this[_0x3749c3(0x17b)][_0x3749c3(0x15b)](_0xdb1d4);}[_0x4ef92b(0x149)](){const _0x39c951=_0x4ef92b;this[_0x39c951(0x17b)][_0x39c951(0x149)]();}[_0x4ef92b(0x184)](_0x4ea213){const _0xeeef4e=_0x4ef92b;this[_0xeeef4e(0x17b)][_0xeeef4e(0x184)](_0x4ea213);}[_0x4ef92b(0x13e)](_0x132f3d){const _0x2df761=_0x4ef92b;this[_0x2df761(0x17b)][_0x2df761(0x13e)](_0x132f3d);}[_0x4ef92b(0x182)](_0x342be6){const _0x54a965=_0x4ef92b;this[_0x54a965(0x17b)][_0x54a965(0x182)](_0x342be6);}[_0x4ef92b(0x183)](_0xc41692,_0x3fcb7d){const _0x29066a=_0x4ef92b;this[_0x29066a(0x17b)][_0x29066a(0x183)](_0xc41692,_0x3fcb7d);}[_0x4ef92b(0x16b)](_0x17db4e,_0x40ad31,_0x57af80){const _0x30bcf8=_0x4ef92b;return this[_0x30bcf8(0x17b)][_0x30bcf8(0x16b)](_0x17db4e,_0x40ad31,_0x57af80);}[_0x4ef92b(0x188)](_0x1acf83){const _0x25ce47=_0x4ef92b;this[_0x25ce47(0x17b)][_0x25ce47(0x188)](_0x1acf83);}[_0x4ef92b(0x173)](_0x109af5){const _0x38f7ce=_0x4ef92b;this[_0x38f7ce(0x187)][_0x38f7ce(0x173)](_0x109af5);}[_0x4ef92b(0x193)](){const _0x1b79d6=_0x4ef92b;this[_0x1b79d6(0x187)][_0x1b79d6(0x193)]();}[_0x4ef92b(0x15f)](_0x11a3d1){const _0x4c0eb7=_0x4ef92b;this[_0x4c0eb7(0x187)][_0x4c0eb7(0x15f)](_0x11a3d1);}[_0x4ef92b(0x19c)](){const _0x23c924=_0x4ef92b;this[_0x23c924(0x187)][_0x23c924(0x19c)]();}[_0x4ef92b(0x170)](){const _0x3f05e8=_0x4ef92b;return this[_0x3f05e8(0x17b)][_0x3f05e8(0x170)]();}[_0x4ef92b(0x174)](){const _0x48b39f=_0x4ef92b;return this[_0x48b39f(0x17b)][_0x48b39f(0x174)]();}[_0x4ef92b(0x19d)](){const _0x122a84=_0x4ef92b;return this[_0x122a84(0x17b)][_0x122a84(0x19d)]();}async[_0x4ef92b(0x197)](_0x175b1e){const _0x4f3d8e=_0x4ef92b;_0x175b1e?!0x1===await this[_0x4f3d8e(0x18c)][_0x4f3d8e(0x128)](_0x175b1e)&&(_0x4d048b(_0x4f3d8e(0x19b),{'conversation':this,'model':_0x175b1e}),_0x175b1e=(await this[_0x4f3d8e(0x18c)][_0x4f3d8e(0x19a)]())[0x0]):(_0x4d048b(_0x4f3d8e(0x177),{'conversation':this}),_0x175b1e=(await this[_0x4f3d8e(0x18c)][_0x4f3d8e(0x19a)]())[0x0]),_0x175b1e['id']!==this[_0x4f3d8e(0x158)]?.['id']&&(this[_0x4f3d8e(0x158)]=_0x175b1e,this[_0x4f3d8e(0x187)][_0x4f3d8e(0x19f)](),this[_0x4f3d8e(0x12e)](_0x4f3d8e(0x14d),{'selectedModel':_0x175b1e}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x502c(_0x42931f,_0x25fc09){var _0x29f7a5=_0x29f7();return _0x502c=function(_0x502c14,_0x3c673f){_0x502c14=_0x502c14-0xf1;var _0x4f1cbe=_0x29f7a5[_0x502c14];return _0x4f1cbe;},_0x502c(_0x42931f,_0x25fc09);}function _0x29f7(){var _0x125719=['6wElbdN','94046duiEMr','9yurZTJ','userMessage','model','conversationId','current-document','3fsDhen','797600VxEyKr','queryAssistant','1016516NJwUBa','get','292936pXTkZJ','279349HrvCuV','mapContextItemsToRequestData','contextItems','sendRequest','connector','getDocumentContext','attributes','capabilities','getCapabilitiesRequestData','187524PuTfSv','69350GaVQuD'];_0x29f7=function(){return _0x125719;};return _0x29f7();}var _0x103eef=_0x502c;(function(_0x594c2e,_0x9bd41e){var _0x171bcb=_0x502c,_0x1881da=_0x594c2e();while(!![]){try{var _0x29539f=-parseInt(_0x171bcb(0xf2))/0x1+-parseInt(_0x171bcb(0x107))/0x2+parseInt(_0x171bcb(0xf8))/0x3*(parseInt(_0x171bcb(0xfb))/0x4)+parseInt(_0x171bcb(0x108))/0x5+-parseInt(_0x171bcb(0xf1))/0x6*(parseInt(_0x171bcb(0xfe))/0x7)+-parseInt(_0x171bcb(0xfd))/0x8*(-parseInt(_0x171bcb(0xf3))/0x9)+parseInt(_0x171bcb(0xf9))/0xa;if(_0x29539f===_0x9bd41e)break;else _0x1881da['push'](_0x1881da['shift']());}catch(_0xf24c92){_0x1881da['push'](_0x1881da['shift']());}}}(_0x29f7,0x263f5));import{AICapabilities as _0x44fbdd}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x159bca}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x3dcbe2}from'./aichatcontext.js';export class AIChatInteraction extends _0x159bca{[_0x103eef(0xf4)];[_0x103eef(0xf6)];[_0x103eef(0x100)]=new Map();[_0x103eef(0xf5)];[_0x103eef(0x104)];constructor(_0x244ed9){var _0x11143c=_0x103eef;super(_0x244ed9),this[_0x11143c(0xf6)]=_0x244ed9[_0x11143c(0xf6)],this[_0x11143c(0x100)]=_0x244ed9[_0x11143c(0x100)],this[_0x11143c(0x105)]=_0x244ed9[_0x11143c(0x105)],this[_0x11143c(0xf4)]=_0x244ed9[_0x11143c(0xf4)],this[_0x11143c(0xf5)]=_0x244ed9[_0x11143c(0xf5)],this[_0x11143c(0x104)]=_0x244ed9[_0x11143c(0x104)];}async[_0x103eef(0x101)](){var _0x5ef7e9=_0x103eef;return this[_0x5ef7e9(0x102)][_0x5ef7e9(0xfa)]({'message':this[_0x5ef7e9(0xf4)],'conversationId':this[_0x5ef7e9(0xf6)],'parts':_0x3dcbe2[_0x5ef7e9(0xff)](this[_0x5ef7e9(0x100)]),'capabilities':_0x44fbdd[_0x5ef7e9(0x106)](this[_0x5ef7e9(0x105)]),'model':this[_0x5ef7e9(0xf5)],'attributes':this[_0x5ef7e9(0x104)]});}[_0x103eef(0x103)](){var _0x4899d3=_0x103eef;return this[_0x4899d3(0x100)][_0x4899d3(0xfc)](_0x4899d3(0xf7));}}
23
+ var _0x124b82=_0x51e4;function _0x51e4(_0x18b79f,_0xc405d2){var _0x49c930=_0x49c9();return _0x51e4=function(_0x51e407,_0x1aa7e0){_0x51e407=_0x51e407-0xb8;var _0xe31051=_0x49c930[_0x51e407];return _0xe31051;},_0x51e4(_0x18b79f,_0xc405d2);}(function(_0x27efe9,_0x366999){var _0x41425d=_0x51e4,_0x2478f9=_0x27efe9();while(!![]){try{var _0x5efa0f=parseInt(_0x41425d(0xc1))/0x1+parseInt(_0x41425d(0xbb))/0x2*(-parseInt(_0x41425d(0xb9))/0x3)+-parseInt(_0x41425d(0xce))/0x4*(-parseInt(_0x41425d(0xc0))/0x5)+parseInt(_0x41425d(0xd1))/0x6*(parseInt(_0x41425d(0xcb))/0x7)+parseInt(_0x41425d(0xcd))/0x8*(parseInt(_0x41425d(0xc4))/0x9)+-parseInt(_0x41425d(0xcf))/0xa+-parseInt(_0x41425d(0xc7))/0xb*(parseInt(_0x41425d(0xc3))/0xc);if(_0x5efa0f===_0x366999)break;else _0x2478f9['push'](_0x2478f9['shift']());}catch(_0x541d57){_0x2478f9['push'](_0x2478f9['shift']());}}}(_0x49c9,0x5b52d));import{AICapabilities as _0x13b8d1}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x1c8dd5}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x16ed6c}from'./aichatcontext.js';function _0x49c9(){var _0x5e00aa=['2992404eatGyH','415026ptlUPs','getCapabilitiesRequestData','userMessage','33NMSEPd','conversationId','sendRequest','model','154SIPBvE','connector','128XOMZdd','2564GNQSjW','6874310jbgCel','current-document','137046rMVnxe','attributes','9kcrEMf','mapContextItemsToRequestData','51902TpQHWQ','get','queryAssistant','capabilities','getDocumentContext','2555WdIlxM','319569JufQXT','contextItems'];_0x49c9=function(){return _0x5e00aa;};return _0x49c9();}export class AIChatInteraction extends _0x1c8dd5{[_0x124b82(0xc6)];[_0x124b82(0xc8)];[_0x124b82(0xc2)]=new Map();[_0x124b82(0xca)];[_0x124b82(0xb8)];constructor(_0x2c067e){var _0x55b0e1=_0x124b82;super(_0x2c067e),this[_0x55b0e1(0xc8)]=_0x2c067e[_0x55b0e1(0xc8)],this[_0x55b0e1(0xc2)]=_0x2c067e[_0x55b0e1(0xc2)],this[_0x55b0e1(0xbe)]=_0x2c067e[_0x55b0e1(0xbe)],this[_0x55b0e1(0xc6)]=_0x2c067e[_0x55b0e1(0xc6)],this[_0x55b0e1(0xca)]=_0x2c067e[_0x55b0e1(0xca)],this[_0x55b0e1(0xb8)]=_0x2c067e[_0x55b0e1(0xb8)];}async[_0x124b82(0xc9)](){var _0x33a8aa=_0x124b82;return this[_0x33a8aa(0xcc)][_0x33a8aa(0xbd)]({'message':this[_0x33a8aa(0xc6)],'conversationId':this[_0x33a8aa(0xc8)],'parts':_0x16ed6c[_0x33a8aa(0xba)](this[_0x33a8aa(0xc2)]),'capabilities':_0x13b8d1[_0x33a8aa(0xc5)](this[_0x33a8aa(0xbe)]),'model':this[_0x33a8aa(0xca)],'attributes':this[_0x33a8aa(0xb8)]});}[_0x124b82(0xbf)](){var _0x3223ec=_0x124b82;return this[_0x3223ec(0xc2)][_0x3223ec(0xbc)](_0x3223ec(0xd0));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1bda56=_0x1c80;function _0x1c80(_0x2cd861,_0x3feccb){const _0x4ecb38=_0x4ecb();return _0x1c80=function(_0x1c8006,_0x3feb6f){_0x1c8006=_0x1c8006-0x16b;let _0x47e74a=_0x4ecb38[_0x1c8006];return _0x47e74a;},_0x1c80(_0x2cd861,_0x3feccb);}(function(_0x1ea776,_0x2c1785){const _0x132f48=_0x1c80,_0x12f392=_0x1ea776();while(!![]){try{const _0x1a0776=parseInt(_0x132f48(0x1aa))/0x1*(-parseInt(_0x132f48(0x1a3))/0x2)+-parseInt(_0x132f48(0x192))/0x3+-parseInt(_0x132f48(0x16d))/0x4*(parseInt(_0x132f48(0x181))/0x5)+parseInt(_0x132f48(0x1a4))/0x6+parseInt(_0x132f48(0x19c))/0x7+parseInt(_0x132f48(0x1ad))/0x8*(parseInt(_0x132f48(0x175))/0x9)+parseInt(_0x132f48(0x1ba))/0xa;if(_0x1a0776===_0x2c1785)break;else _0x12f392['push'](_0x12f392['shift']());}catch(_0x5ce24a){_0x12f392['push'](_0x12f392['shift']());}}}(_0x4ecb,0x3a359));import{FocusTracker as _0x17a87e,KeystrokeHandler as _0x5bb40c}from'ckeditor5/src/utils.js';import{AISuggestionStreamableContentView as _0x1b09d0}from'../../aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js';import{AISuggestionContentPartToolbarView as _0x3d86db}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js';import{AIMiniToolbarView as _0x504158}from'../../aicore/ui/suggestioncontainer/aiminitoolbarview.js';import{AIBalloonView as _0x4badfe}from'../../aiballoon/ui/aiballoonview.js';import{ButtonView as _0x3f52ac,FocusCycler as _0x2e82d3,View as _0x3ffc14}from'ckeditor5/src/ui.js';function _0x4ecb(){const _0x44449b=['showDiff','1352aiVFPV','toggleSuggestionDisplayMode','AI_BALLOON_PREVIOUS_LABEL','216LlGbzx','tab','isEnabled','createCollection','availableActions','focusCycler','destroy','_togglePartToolbarButtonsVisibility','focusLast','_focusTracker','_keystrokes','toggleRotatorButtonsVisibility','_isErrorVisible','6693190xubmAf','_streamableContentView','ck-ai-chat-balloon__toolbar-container','_config','_miniToolbarView','locale','add','4dApkIW','update','render','div','change:isTrackChangesOn','_createNextButtonView','_stateView','isTrackChangesOn','65781XWxPPI','previousButtonView','setTemplate','bind','element','_state','bindTemplate','insertSuggestion','full','toggleShowChanges','togglePartToolbarEnabled','hideError','1482545delOCO','setState','ck-ai-chat-balloon-main_state_','children','showError','addMany','isShowChangesOn','includes','_focusables','listenTo','showBlockingError','set','AI_BALLOON_NEXT_LABEL','showNext','focusFirst','delegate','execute','828477KWLPPR','fire','_toolbarContainerView','change:_state','applySuggestion','showPrevious','updateContent','focus','keepErrors','setButtonsVisibility','50498ZiSZcV','_createPreviousButtonView','shift\x20+\x20tab','rejectSuggestion','_partToolbarView','pending','has','116lhVBCB','93798lronDk','nextButtonView','_errorView','ck-ai-chat-balloon-main','isVisible'];_0x4ecb=function(){return _0x44449b;};return _0x4ecb();}import{AISuggestionContentPartStateView as _0x4925f4}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js';import{IconChevronDown as _0x1a59e8,IconChevronUp as _0x1d07ab}from'ckeditor5/src/icons.js';import{getTranslation as _0x15a3c4}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichatballoon.css';export class AIChatBalloonView extends _0x4badfe{[_0x1bda56(0x184)];[_0x1bda56(0x1a5)];[_0x1bda56(0x176)];[_0x1bda56(0x1b2)];[_0x1bda56(0x189)];[_0x1bda56(0x1b6)];[_0x1bda56(0x1b7)];[_0x1bda56(0x1bd)];[_0x1bda56(0x1bb)];[_0x1bda56(0x194)];[_0x1bda56(0x1a0)];[_0x1bda56(0x173)];[_0x1bda56(0x1be)];constructor(_0x19566e,_0x37c268){const _0x33f6fa=_0x1bda56;super(_0x19566e);const _0x3fcbb9=this[_0x33f6fa(0x17b)];this[_0x33f6fa(0x18c)](_0x33f6fa(0x1a9),!0x1),this[_0x33f6fa(0x18c)](_0x33f6fa(0x17a),_0x33f6fa(0x1a1)),this[_0x33f6fa(0x1b6)]=new _0x17a87e(),this[_0x33f6fa(0x1b7)]=new _0x5bb40c(),this[_0x33f6fa(0x189)]=this[_0x33f6fa(0x1b0)](),this[_0x33f6fa(0x1b2)]=new _0x2e82d3({'focusables':this[_0x33f6fa(0x189)],'focusTracker':this[_0x33f6fa(0x1b6)],'keystrokeHandler':this[_0x33f6fa(0x1b7)],'actions':{'focusPrevious':_0x33f6fa(0x19e),'focusNext':_0x33f6fa(0x1ae)}}),this[_0x33f6fa(0x1bd)]=_0x37c268,this[_0x33f6fa(0x1a5)]=this[_0x33f6fa(0x172)](),this[_0x33f6fa(0x176)]=this[_0x33f6fa(0x19d)](),this[_0x33f6fa(0x1bb)]=new _0x1b09d0(_0x19566e),this[_0x33f6fa(0x1a0)]=new _0x3d86db(_0x19566e,_0x37c268[_0x33f6fa(0x1b1)]),this[_0x33f6fa(0x1a0)][_0x33f6fa(0x190)](_0x33f6fa(0x196),_0x33f6fa(0x17c),_0x33f6fa(0x19f))['to'](this),this[_0x33f6fa(0x1b4)](_0x37c268),this[_0x33f6fa(0x173)]=new _0x4925f4(_0x19566e),this[_0x33f6fa(0x173)][_0x33f6fa(0x1a8)]=!0x1,this[_0x33f6fa(0x1be)]=new _0x504158(_0x19566e,{'showChanges':_0x33f6fa(0x17d)}),this[_0x33f6fa(0x1be)][_0x33f6fa(0x178)](_0x33f6fa(0x187))['to'](this,_0x33f6fa(0x1a9)),this[_0x33f6fa(0x1be)]['on'](_0x33f6fa(0x17e),()=>{const _0x3a2e64=_0x33f6fa;this[_0x3a2e64(0x193)](_0x3a2e64(0x1ab));}),this[_0x33f6fa(0x194)]=new ls(_0x19566e,[this[_0x33f6fa(0x1a0)],this[_0x33f6fa(0x173)],this[_0x33f6fa(0x1be)]]),this[_0x33f6fa(0x184)]=this[_0x33f6fa(0x1b0)]([this[_0x33f6fa(0x1bb)],this[_0x33f6fa(0x194)]]),this['on'](_0x33f6fa(0x195),(_0x8b51e4,_0x1341ab,_0x2b9485,_0x2f1207)=>{const _0x48f751=_0x33f6fa;let _0x4baa6f,_0x37dc9f;_0x48f751(0x1a1)===_0x2f1207?(_0x4baa6f=this[_0x48f751(0x1a0)],_0x37dc9f=this[_0x48f751(0x173)]):(_0x4baa6f=this[_0x48f751(0x173)],_0x37dc9f=this[_0x48f751(0x1a0)]),this[_0x48f751(0x173)][_0x48f751(0x182)](_0x2b9485),_0x4baa6f[_0x48f751(0x1a8)]=!0x1,_0x37dc9f[_0x48f751(0x1a8)]=!0x0;}),this[_0x33f6fa(0x177)]({'tag':_0x33f6fa(0x170),'attributes':{'class':['ck',_0x33f6fa(0x1a7),_0x3fcbb9['to'](_0x33f6fa(0x17a),_0x3a2c27=>_0x33f6fa(0x183)+_0x3a2c27)]},'children':this[_0x33f6fa(0x184)]}),this['on'](_0x33f6fa(0x171),()=>{const _0x2568a6=_0x33f6fa;this[_0x2568a6(0x1b4)](_0x37c268);});}[_0x1bda56(0x16f)](){const _0x1d4253=_0x1bda56;super[_0x1d4253(0x16f)](),this[_0x1d4253(0x1a5)][_0x1d4253(0x16f)](),this[_0x1d4253(0x176)][_0x1d4253(0x16f)](),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x179)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x1a5)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x176)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x1be)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x1a0)]),this[_0x1d4253(0x1b7)][_0x1d4253(0x18a)](this[_0x1d4253(0x179)]),this[_0x1d4253(0x1b7)][_0x1d4253(0x18a)](this[_0x1d4253(0x1a5)][_0x1d4253(0x179)]),this[_0x1d4253(0x1b7)][_0x1d4253(0x18a)](this[_0x1d4253(0x176)][_0x1d4253(0x179)]),this[_0x1d4253(0x189)][_0x1d4253(0x186)]([this[_0x1d4253(0x1a5)],this[_0x1d4253(0x176)],this[_0x1d4253(0x1a0)],this[_0x1d4253(0x1be)]]);}[_0x1bda56(0x1b3)](){const _0x4dd081=_0x1bda56;super[_0x4dd081(0x1b3)](),this[_0x4dd081(0x176)][_0x4dd081(0x1b3)](),this[_0x4dd081(0x1a5)][_0x4dd081(0x1b3)]();}[_0x1bda56(0x199)](){const _0x45b1bb=_0x1bda56;this[_0x45b1bb(0x1b2)][_0x45b1bb(0x18f)]();}[_0x1bda56(0x1b5)](){const _0x16cdf1=_0x1bda56;this[_0x16cdf1(0x1b2)][_0x16cdf1(0x1b5)]();}async[_0x1bda56(0x198)](_0x4ff462){const _0x51d64b=_0x1bda56;_0x4ff462?.[_0x51d64b(0x19a)]||this[_0x51d64b(0x180)](),await this[_0x51d64b(0x1bb)][_0x51d64b(0x16e)](_0x4ff462);}[_0x1bda56(0x182)](_0x742f21){const _0x253fac=_0x1bda56;this[_0x253fac(0x17a)]=_0x742f21;}[_0x1bda56(0x185)](_0x5d5c55){const _0x6c010b=_0x1bda56;super[_0x6c010b(0x185)](_0x5d5c55),this[_0x6c010b(0x184)][_0x6c010b(0x1a2)](this[_0x6c010b(0x1a6)])||this[_0x6c010b(0x184)][_0x6c010b(0x16c)](this[_0x6c010b(0x1a6)],0x0);}[_0x1bda56(0x180)](){const _0x2c01b1=_0x1bda56;this[_0x2c01b1(0x1b9)]&&(super[_0x2c01b1(0x180)](),this[_0x2c01b1(0x17f)](!0x0));}[_0x1bda56(0x18b)](_0x3ab216){const _0x5f13c2=_0x1bda56;super[_0x5f13c2(0x18b)](_0x3ab216),this[_0x5f13c2(0x17f)](!0x1);}[_0x1bda56(0x1b8)](_0x2ad369){const _0x3a7c91=_0x1bda56;this[_0x3a7c91(0x1a5)][_0x3a7c91(0x1a8)]=this[_0x3a7c91(0x176)][_0x3a7c91(0x1a8)]=_0x2ad369;}[_0x1bda56(0x17f)](_0x23dc41){const _0x19ef16=_0x1bda56;this[_0x19ef16(0x1a0)][_0x19ef16(0x1af)]=_0x23dc41;}[_0x1bda56(0x1b4)]({showApplyButton:_0x561c5b,showSuggestButton:_0x4f0fdc}){const _0x8536c2=_0x1bda56;_0x561c5b=_0x561c5b&&!this[_0x8536c2(0x174)]&&this[_0x8536c2(0x1bd)][_0x8536c2(0x1b1)][_0x8536c2(0x188)](_0x8536c2(0x196)),_0x4f0fdc=_0x4f0fdc&&this[_0x8536c2(0x1bd)][_0x8536c2(0x1b1)][_0x8536c2(0x188)](_0x8536c2(0x17c)),this[_0x8536c2(0x1a0)][_0x8536c2(0x19b)]({'showApplyButton':_0x561c5b,'showSuggestButton':_0x4f0fdc});}[_0x1bda56(0x172)](){const _0x51b8c7=_0x1bda56,_0xd0f848=new _0x3f52ac(this[_0x51b8c7(0x16b)]);return _0xd0f848[_0x51b8c7(0x18c)]({'icon':_0x1a59e8,'label':_0x15a3c4(this[_0x51b8c7(0x16b)],_0x51b8c7(0x18d)),'isVisible':!0x0}),_0xd0f848['on'](_0x51b8c7(0x191),()=>{const _0x3ee858=_0x51b8c7;this[_0x3ee858(0x193)](_0x3ee858(0x18e));}),_0xd0f848;}[_0x1bda56(0x19d)](){const _0x59f3e1=_0x1bda56,_0x3444fa=new _0x3f52ac(this[_0x59f3e1(0x16b)]);return _0x3444fa[_0x59f3e1(0x18c)]({'icon':_0x1d07ab,'label':_0x15a3c4(this[_0x59f3e1(0x16b)],_0x59f3e1(0x1ac)),'isVisible':!0x0}),_0x3444fa['on'](_0x59f3e1(0x191),()=>{const _0x341c1e=_0x59f3e1;this[_0x341c1e(0x193)](_0x341c1e(0x197));}),_0x3444fa;}}class ls extends _0x3ffc14{constructor(_0x11fd1e,_0x5f434e){const _0xe6ce5a=_0x1bda56;super(_0x11fd1e),this[_0xe6ce5a(0x177)]({'tag':_0xe6ce5a(0x170),'attributes':{'class':[_0xe6ce5a(0x1bc)]},'children':_0x5f434e});}}
23
+ const _0xed3f52=_0x18e1;function _0x2625(){const _0x342430=['4993616VckspW','_createNextButtonView','change:isTrackChangesOn','toggleSuggestionDisplayMode','_createPreviousButtonView','locale','722316rOlfub','_keystrokes','fire','_isErrorVisible','_stateView','includes','previousButtonView','children','_togglePartToolbarButtonsVisibility','availableActions','_partToolbarView','render','createCollection','AI_BALLOON_NEXT_LABEL','destroy','focusLast','updateContent','_toolbarContainerView','_config','element','nextButtonView','div','1426173MDsphO','focusFirst','setButtonsVisibility','isShowChangesOn','addMany','full','_focusTracker','ck-ai-chat-balloon-main_state_','1375070uzqWhL','_streamableContentView','listenTo','_miniToolbarView','AI_BALLOON_PREVIOUS_LABEL','2BPcvhm','toggleRotatorButtonsVisibility','focusCycler','208mHrFlv','bindTemplate','toggleShowChanges','tab','showPrevious','showDiff','_errorView','isTrackChangesOn','1202346PHWxSx','isEnabled','execute','pending','setState','showError','delegate','3588440eRXoHt','rejectSuggestion','set','add','focus','showBlockingError','has','keepErrors','applySuggestion','ck-ai-chat-balloon__toolbar-container','isVisible','shift\x20+\x20tab','change:_state','update','insertSuggestion','togglePartToolbarEnabled','showNext','709446YTBpRJ','_focusables','hideError','ck-ai-chat-balloon-main','setTemplate','bind','_state'];_0x2625=function(){return _0x342430;};return _0x2625();}(function(_0x43308e,_0x3670c3){const _0x57175a=_0x18e1,_0x3ef6aa=_0x43308e();while(!![]){try{const _0x5cdee0=-parseInt(_0x57175a(0x1b4))/0x1+parseInt(_0x57175a(0x1b9))/0x2*(parseInt(_0x57175a(0x189))/0x3)+-parseInt(_0x57175a(0x190))/0x4+-parseInt(_0x57175a(0x1cb))/0x5+parseInt(_0x57175a(0x196))/0x6+parseInt(_0x57175a(0x1ac))/0x7+parseInt(_0x57175a(0x1bc))/0x8*(parseInt(_0x57175a(0x1c4))/0x9);if(_0x5cdee0===_0x3670c3)break;else _0x3ef6aa['push'](_0x3ef6aa['shift']());}catch(_0x567950){_0x3ef6aa['push'](_0x3ef6aa['shift']());}}}(_0x2625,0xa9299));import{FocusTracker as _0x6122c8,KeystrokeHandler as _0x55e54c}from'ckeditor5/src/utils.js';import{AISuggestionStreamableContentView as _0x3324b5}from'../../aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js';function _0x18e1(_0x56cc20,_0x57a849){const _0x2625c5=_0x2625();return _0x18e1=function(_0x18e1d5,_0x1c3951){_0x18e1d5=_0x18e1d5-0x17f;let _0x5b236a=_0x2625c5[_0x18e1d5];return _0x5b236a;},_0x18e1(_0x56cc20,_0x57a849);}import{AISuggestionContentPartToolbarView as _0x1c6544}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js';import{AIMiniToolbarView as _0x19c6d8}from'../../aicore/ui/suggestioncontainer/aiminitoolbarview.js';import{AIBalloonView as _0x56c006}from'../../aiballoon/ui/aiballoonview.js';import{ButtonView as _0x1a8758,FocusCycler as _0x4ce837,View as _0x103061}from'ckeditor5/src/ui.js';import{AISuggestionContentPartStateView as _0x319d6b}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js';import{IconChevronDown as _0x50e553,IconChevronUp as _0x5c80ef}from'ckeditor5/src/icons.js';import{getTranslation as _0x1a1fb8}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichatballoon.css';export class AIChatBalloonView extends _0x56c006{[_0xed3f52(0x19d)];[_0xed3f52(0x1aa)];[_0xed3f52(0x19c)];[_0xed3f52(0x1bb)];[_0xed3f52(0x18a)];[_0xed3f52(0x1b2)];[_0xed3f52(0x197)];[_0xed3f52(0x1a8)];[_0xed3f52(0x1b5)];[_0xed3f52(0x1a7)];[_0xed3f52(0x1a0)];[_0xed3f52(0x19a)];[_0xed3f52(0x1b7)];constructor(_0x21df95,_0x5baca8){const _0x4e8484=_0xed3f52;super(_0x21df95);const _0x21c0ec=this[_0x4e8484(0x1bd)];this[_0x4e8484(0x1cd)](_0x4e8484(0x1c1),!0x1),this[_0x4e8484(0x1cd)](_0x4e8484(0x18f),_0x4e8484(0x1c7)),this[_0x4e8484(0x1b2)]=new _0x6122c8(),this[_0x4e8484(0x197)]=new _0x55e54c(),this[_0x4e8484(0x18a)]=this[_0x4e8484(0x1a2)](),this[_0x4e8484(0x1bb)]=new _0x4ce837({'focusables':this[_0x4e8484(0x18a)],'focusTracker':this[_0x4e8484(0x1b2)],'keystrokeHandler':this[_0x4e8484(0x197)],'actions':{'focusPrevious':_0x4e8484(0x183),'focusNext':_0x4e8484(0x1bf)}}),this[_0x4e8484(0x1a8)]=_0x5baca8,this[_0x4e8484(0x1aa)]=this[_0x4e8484(0x191)](),this[_0x4e8484(0x19c)]=this[_0x4e8484(0x194)](),this[_0x4e8484(0x1b5)]=new _0x3324b5(_0x21df95),this[_0x4e8484(0x1a0)]=new _0x1c6544(_0x21df95,_0x5baca8[_0x4e8484(0x19f)]),this[_0x4e8484(0x1a0)][_0x4e8484(0x1ca)](_0x4e8484(0x180),_0x4e8484(0x186),_0x4e8484(0x1cc))['to'](this),this[_0x4e8484(0x19e)](_0x5baca8),this[_0x4e8484(0x19a)]=new _0x319d6b(_0x21df95),this[_0x4e8484(0x19a)][_0x4e8484(0x182)]=!0x1,this[_0x4e8484(0x1b7)]=new _0x19c6d8(_0x21df95,{'showChanges':_0x4e8484(0x1b1)}),this[_0x4e8484(0x1b7)][_0x4e8484(0x18e)](_0x4e8484(0x1af))['to'](this,_0x4e8484(0x1c1)),this[_0x4e8484(0x1b7)]['on'](_0x4e8484(0x1be),()=>{const _0x468e39=_0x4e8484;this[_0x468e39(0x198)](_0x468e39(0x193));}),this[_0x4e8484(0x1a7)]=new fs(_0x21df95,[this[_0x4e8484(0x1a0)],this[_0x4e8484(0x19a)],this[_0x4e8484(0x1b7)]]),this[_0x4e8484(0x19d)]=this[_0x4e8484(0x1a2)]([this[_0x4e8484(0x1b5)],this[_0x4e8484(0x1a7)]]),this['on'](_0x4e8484(0x184),(_0x318210,_0x18b583,_0x41f6c0,_0x3d01a7)=>{const _0x57d814=_0x4e8484;let _0x1ff056,_0x24dd14;_0x57d814(0x1c7)===_0x3d01a7?(_0x1ff056=this[_0x57d814(0x1a0)],_0x24dd14=this[_0x57d814(0x19a)]):(_0x1ff056=this[_0x57d814(0x19a)],_0x24dd14=this[_0x57d814(0x1a0)]),this[_0x57d814(0x19a)][_0x57d814(0x1c8)](_0x41f6c0),_0x1ff056[_0x57d814(0x182)]=!0x1,_0x24dd14[_0x57d814(0x182)]=!0x0;}),this[_0x4e8484(0x18d)]({'tag':_0x4e8484(0x1ab),'attributes':{'class':['ck',_0x4e8484(0x18c),_0x21c0ec['to'](_0x4e8484(0x18f),_0xbc71df=>_0x4e8484(0x1b3)+_0xbc71df)]},'children':this[_0x4e8484(0x19d)]}),this['on'](_0x4e8484(0x192),()=>{const _0x4a1581=_0x4e8484;this[_0x4a1581(0x19e)](_0x5baca8);});}[_0xed3f52(0x1a1)](){const _0x19a2d8=_0xed3f52;super[_0x19a2d8(0x1a1)](),this[_0x19a2d8(0x1aa)][_0x19a2d8(0x1a1)](),this[_0x19a2d8(0x19c)][_0x19a2d8(0x1a1)](),this[_0x19a2d8(0x1b2)][_0x19a2d8(0x1ce)](this[_0x19a2d8(0x1a9)]),this[_0x19a2d8(0x1b2)][_0x19a2d8(0x1ce)](this[_0x19a2d8(0x1aa)]),this[_0x19a2d8(0x1b2)][_0x19a2d8(0x1ce)](this[_0x19a2d8(0x19c)]),this[_0x19a2d8(0x1b2)][_0x19a2d8(0x1ce)](this[_0x19a2d8(0x1b7)]),this[_0x19a2d8(0x1b2)][_0x19a2d8(0x1ce)](this[_0x19a2d8(0x1a0)]),this[_0x19a2d8(0x197)][_0x19a2d8(0x1b6)](this[_0x19a2d8(0x1a9)]),this[_0x19a2d8(0x197)][_0x19a2d8(0x1b6)](this[_0x19a2d8(0x1aa)][_0x19a2d8(0x1a9)]),this[_0x19a2d8(0x197)][_0x19a2d8(0x1b6)](this[_0x19a2d8(0x19c)][_0x19a2d8(0x1a9)]),this[_0x19a2d8(0x18a)][_0x19a2d8(0x1b0)]([this[_0x19a2d8(0x1aa)],this[_0x19a2d8(0x19c)],this[_0x19a2d8(0x1a0)],this[_0x19a2d8(0x1b7)]]);}[_0xed3f52(0x1a4)](){const _0x4f85a3=_0xed3f52;super[_0x4f85a3(0x1a4)](),this[_0x4f85a3(0x19c)][_0x4f85a3(0x1a4)](),this[_0x4f85a3(0x1aa)][_0x4f85a3(0x1a4)]();}[_0xed3f52(0x1cf)](){const _0x151d7b=_0xed3f52;this[_0x151d7b(0x1bb)][_0x151d7b(0x1ad)]();}[_0xed3f52(0x1a5)](){const _0x3cb305=_0xed3f52;this[_0x3cb305(0x1bb)][_0x3cb305(0x1a5)]();}async[_0xed3f52(0x1a6)](_0x5383c3){const _0x47324d=_0xed3f52;_0x5383c3?.[_0x47324d(0x17f)]||this[_0x47324d(0x18b)](),await this[_0x47324d(0x1b5)][_0x47324d(0x185)](_0x5383c3);}[_0xed3f52(0x1c8)](_0x34c339){const _0x53317f=_0xed3f52;this[_0x53317f(0x18f)]=_0x34c339;}[_0xed3f52(0x1c9)](_0x2aaddd){const _0x719157=_0xed3f52;super[_0x719157(0x1c9)](_0x2aaddd),this[_0x719157(0x19d)][_0x719157(0x1d1)](this[_0x719157(0x1c2)])||this[_0x719157(0x19d)][_0x719157(0x1ce)](this[_0x719157(0x1c2)],0x0);}[_0xed3f52(0x18b)](){const _0x2c2553=_0xed3f52;this[_0x2c2553(0x199)]&&(super[_0x2c2553(0x18b)](),this[_0x2c2553(0x187)](!0x0));}[_0xed3f52(0x1d0)](_0x7ee02){const _0x2ecf92=_0xed3f52;super[_0x2ecf92(0x1d0)](_0x7ee02),this[_0x2ecf92(0x187)](!0x1);}[_0xed3f52(0x1ba)](_0x2cf641){const _0xfa7bdb=_0xed3f52;this[_0xfa7bdb(0x1aa)][_0xfa7bdb(0x182)]=this[_0xfa7bdb(0x19c)][_0xfa7bdb(0x182)]=_0x2cf641;}[_0xed3f52(0x187)](_0x12a70b){const _0x106efe=_0xed3f52;this[_0x106efe(0x1a0)][_0x106efe(0x1c5)]=_0x12a70b;}[_0xed3f52(0x19e)]({showApplyButton:_0x31e3e7,showSuggestButton:_0x320a84}){const _0x50166b=_0xed3f52;_0x31e3e7=_0x31e3e7&&!this[_0x50166b(0x1c3)]&&this[_0x50166b(0x1a8)][_0x50166b(0x19f)][_0x50166b(0x19b)](_0x50166b(0x180)),_0x320a84=_0x320a84&&this[_0x50166b(0x1a8)][_0x50166b(0x19f)][_0x50166b(0x19b)](_0x50166b(0x186)),this[_0x50166b(0x1a0)][_0x50166b(0x1ae)]({'showApplyButton':_0x31e3e7,'showSuggestButton':_0x320a84});}[_0xed3f52(0x191)](){const _0x148bb8=_0xed3f52,_0x2a5ac8=new _0x1a8758(this[_0x148bb8(0x195)]);return _0x2a5ac8[_0x148bb8(0x1cd)]({'icon':_0x50e553,'label':_0x1a1fb8(this[_0x148bb8(0x195)],_0x148bb8(0x1a3)),'isVisible':!0x0}),_0x2a5ac8['on'](_0x148bb8(0x1c6),()=>{const _0x41ee94=_0x148bb8;this[_0x41ee94(0x198)](_0x41ee94(0x188));}),_0x2a5ac8;}[_0xed3f52(0x194)](){const _0x13ec4c=_0xed3f52,_0x4a33a6=new _0x1a8758(this[_0x13ec4c(0x195)]);return _0x4a33a6[_0x13ec4c(0x1cd)]({'icon':_0x5c80ef,'label':_0x1a1fb8(this[_0x13ec4c(0x195)],_0x13ec4c(0x1b8)),'isVisible':!0x0}),_0x4a33a6['on'](_0x13ec4c(0x1c6),()=>{const _0x27710a=_0x13ec4c;this[_0x27710a(0x198)](_0x27710a(0x1c0));}),_0x4a33a6;}}class fs extends _0x103061{constructor(_0x1bb914,_0x587ec7){const _0x2f5588=_0xed3f52;super(_0x1bb914),this[_0x2f5588(0x18d)]({'tag':_0x2f5588(0x1ab),'attributes':{'class':[_0x2f5588(0x181)]},'children':_0x587ec7});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4b2054=_0x5d2d;(function(_0x3d603e,_0x18b840){const _0x1ceacf=_0x5d2d,_0x3c397b=_0x3d603e();while(!![]){try{const _0x3fc255=-parseInt(_0x1ceacf(0x1d5))/0x1+-parseInt(_0x1ceacf(0x1ef))/0x2+parseInt(_0x1ceacf(0x20d))/0x3*(parseInt(_0x1ceacf(0x20f))/0x4)+parseInt(_0x1ceacf(0x1e2))/0x5+parseInt(_0x1ceacf(0x1e4))/0x6*(-parseInt(_0x1ceacf(0x1c5))/0x7)+-parseInt(_0x1ceacf(0x1f7))/0x8+parseInt(_0x1ceacf(0x1f4))/0x9;if(_0x3fc255===_0x18b840)break;else _0x3c397b['push'](_0x3c397b['shift']());}catch(_0x3a5df4){_0x3c397b['push'](_0x3c397b['shift']());}}}(_0x288e,0xeacbc));function _0x5d2d(_0xbb7381,_0x504f9e){const _0x288ee7=_0x288e();return _0x5d2d=function(_0x5d2d0b,_0xab74f){_0x5d2d0b=_0x5d2d0b-0x1c3;let _0x3d5170=_0x288ee7[_0x5d2d0b];return _0x3d5170;},_0x5d2d(_0xbb7381,_0x504f9e);}import{ButtonView as _0x23a1d5,clickOutsideHandler as _0x4111f5,View as _0x489404}from'ckeditor5/src/ui.js';import{AIChatPromptInputView as _0x97b6ad}from'./controls/aichatpromptinputview.js';import{AIChatPromptCapabilitiesView as _0x474a45}from'./controls/aichatpromptcapabilitiesview.js';import{AIChatContextPanelView as _0x54a01b,CONTEXT_PANEL_VIEW_EVENT_NAMES as _0x4a4b89}from'./controls/aichatcontextpanelview.js';import{AIChatControlsLoaderView as _0x2c0e94}from'./controls/aichatcontrolsloaderview.js';import{getTranslation as _0xba7497}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichat-controls.css';import'../../../theme/aichat/aichat-controls/prompt-input.css';import'../../../theme/aichat/aichat-controls/prompt-capabilities.css';function _0x288e(){const _0x4bf9e4=['startConversation','_shouldRestorePromptInputFocus','setAddContextOptions','74795tlKrvB','value','isModelAvailable','setTemplate','_createModelUnavailableMessageView','clearPendingContextUI','toggleWebSearch','div','bindTemplate','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_TEXT','addContextItem','_contextPanelView','setReasoning','setModelList','ck-ai-chat-controls__start-new-chat-button','focusPromptInput','1216137YfLHtg','change:isLoading','focus','clearConversationContextUI','setIsUploadInProgress','closeSourceResourceBalloon','ck-ai-chat-controls','locale','_createLoaderView','resetMessageInput','populateSourceResourceBalloon','form','_handlePromptInputFocus','5363165mPToyd','set','996ZoLGxo','abortPromptStream','setContextItemLoading','disableModelSelector','setInputPlaceholder','clearCurrentContextItems','delegate','addContextButtonView','setModel','updateResourceState','setPromptInputValue','565290tcjuRs','bodyCollection','_createPromptCapabilitiesView','_loaderView','isLoading','29522421UtCRFg','element','toggleReasoning','15008824pGKteB','removeContextItem','_promptInputView','_promptCapabilitiesView','ck-ai-chat-controls-model-unavailable-message','contextResourcesSearchInputVisibleFrom','_createPromptInputView','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_BUTTON','setPlaceholderText','selectModel','execute','clearConversationContextItems','fieldView','setWebSearch','low','_modelUnavailableMessageView','enableModelSelector','queryView','sendUserMessage','reset','ck-ai-chat-controls-disabled','setConversationContext','3ARexph','ck-hidden','7029668rrouIQ','isDisabled','_createContextPanelView'];_0x288e=function(){return _0x4bf9e4;};return _0x288e();}import'../../../theme/aichat/aichat-controls/model-unavailable-message.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls.css';import'../../../theme/aichat/aichat-controls/aichat-context-chip.css';import'../../../theme/aichat/aichat-controls/aichat-controls-button.css';import'../../../theme/aichat/aichat-controls/aichat-controls-loader.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css';export class AIChatControlsView extends _0x489404{[_0x4b2054(0x1d0)];[_0x4b2054(0x1f9)];[_0x4b2054(0x1fa)];[_0x4b2054(0x1f2)];[_0x4b2054(0x206)];[_0x4b2054(0x1c3)];constructor(_0x12bb05,_0x482d31){const _0x598715=_0x4b2054;super(_0x12bb05),this[_0x598715(0x1d0)]=this[_0x598715(0x211)](_0x12bb05,{'bodyCollection':_0x482d31[_0x598715(0x1f0)],'searchInputVisibleFrom':_0x482d31[_0x598715(0x1fc)]}),this[_0x598715(0x1f9)]=this[_0x598715(0x1fd)](_0x12bb05),this[_0x598715(0x1fa)]=this[_0x598715(0x1f1)](_0x12bb05),this[_0x598715(0x1f2)]=this[_0x598715(0x1dd)](_0x12bb05),this[_0x598715(0x206)]=this[_0x598715(0x1c9)](_0x12bb05),this[_0x598715(0x1c3)]=!0x1,this[_0x598715(0x1f9)][_0x598715(0x1ea)](_0x598715(0x209))['to'](this),this[_0x598715(0x1f2)][_0x598715(0x1ea)](_0x598715(0x1e5))['to'](this),this[_0x598715(0x1fa)][_0x598715(0x1ea)](_0x598715(0x1cb))['to'](this),this[_0x598715(0x1fa)][_0x598715(0x1ea)](_0x598715(0x1f6))['to'](this),this[_0x598715(0x1fa)][_0x598715(0x1ea)](_0x598715(0x200))['to'](this),this[_0x598715(0x1d0)][_0x598715(0x1ea)](..._0x4a4b89)['to'](this),this[_0x598715(0x1e3)](_0x598715(0x1c7),!0x0),this[_0x598715(0x1e3)](_0x598715(0x210),!0x1);const _0x3e9678=this[_0x598715(0x1cd)];this[_0x598715(0x1c8)]({'tag':_0x598715(0x1e0),'attributes':{'class':['ck',_0x598715(0x1db),_0x3e9678['if'](_0x598715(0x210),_0x598715(0x20b))]},'children':[{'tag':_0x598715(0x1cc),'attributes':{'class':[_0x3e9678['if'](_0x598715(0x1f3),_0x598715(0x20e),_0x473c51=>_0x473c51||!this[_0x598715(0x1c7)]),_0x3e9678['if'](_0x598715(0x1c7),_0x598715(0x20e),_0x36cc84=>!_0x36cc84||this[_0x598715(0x1f3)])]},'children':[this[_0x598715(0x1d0)],this[_0x598715(0x1f9)],this[_0x598715(0x1fa)]]},{'tag':_0x598715(0x1cc),'attributes':{'class':[_0x3e9678['if'](_0x598715(0x1f3),_0x598715(0x20e),_0x24e6f7=>!_0x24e6f7)]},'children':[this[_0x598715(0x1f2)]]},{'tag':_0x598715(0x1cc),'attributes':{'class':[_0x3e9678['if'](_0x598715(0x1c7),_0x598715(0x20e),_0x5fe739=>_0x5fe739)]},'children':[this[_0x598715(0x206)]]}]}),_0x4111f5({'emitter':this[_0x598715(0x1f9)],'activator':()=>this[_0x598715(0x1f3)],'contextElements':()=>[this[_0x598715(0x1f5)]],'callback':()=>{const _0x5e26d0=_0x598715;this[_0x5e26d0(0x1c3)]=!0x1;}}),this['on'](_0x598715(0x1d6),this[_0x598715(0x1e1)],{'priority':_0x598715(0x205)});}[_0x4b2054(0x211)](_0x20837e,_0x20681f){return new _0x54a01b(_0x20837e,_0x20681f);}[_0x4b2054(0x1fd)](_0x386413){const _0x117646=_0x4b2054;return new _0x97b6ad(_0x386413,this[_0x117646(0x1d0)][_0x117646(0x1eb)]);}[_0x4b2054(0x1f1)](_0x77c049){return new _0x474a45(_0x77c049);}[_0x4b2054(0x1dd)](_0x21d9ae){return new _0x2c0e94(_0x21d9ae);}[_0x4b2054(0x1c9)](_0x1e60d5){const _0x12b58c=_0x4b2054,_0x3552f2=new _s(_0x1e60d5);return _0x3552f2[_0x12b58c(0x1ea)](_0x12b58c(0x212))['to'](this),_0x3552f2;}[_0x4b2054(0x1e1)](_0x5e81a5,_0x151c6c,_0x59689e){const _0x29fbdb=_0x4b2054;_0x59689e?this[_0x29fbdb(0x1c3)]=!0x0:this[_0x29fbdb(0x1c3)]&&this[_0x29fbdb(0x1f9)][_0x29fbdb(0x1d7)]();}[_0x4b2054(0x1cf)](_0xaf0c30,_0x88bb8b){const _0x3c2b8a=_0x4b2054;this[_0x3c2b8a(0x1d0)][_0x3c2b8a(0x1cf)](_0xaf0c30,_0x88bb8b);}[_0x4b2054(0x1f8)](_0x3f8ca4){const _0x462866=_0x4b2054;this[_0x462866(0x1d0)][_0x462866(0x1f8)](_0x3f8ca4);}[_0x4b2054(0x1e6)](_0x46e240,_0x32ae25){const _0x555420=_0x4b2054;this[_0x555420(0x1d0)][_0x555420(0x1e6)](_0x46e240,_0x32ae25);}[_0x4b2054(0x1d9)](_0xbec87){const _0x454c87=_0x4b2054;this[_0x454c87(0x1f9)][_0x454c87(0x1d9)](_0xbec87);}[_0x4b2054(0x20c)](_0x120253){const _0x3347bc=_0x4b2054;this[_0x3347bc(0x1d0)][_0x3347bc(0x20c)](_0x120253);}[_0x4b2054(0x1ca)](){const _0x14320d=_0x4b2054;this[_0x14320d(0x1d0)][_0x14320d(0x1e9)]();}[_0x4b2054(0x1d8)](){const _0x2618f8=_0x4b2054;this[_0x2618f8(0x1d0)][_0x2618f8(0x202)]();}[_0x4b2054(0x1ed)](_0x30cfb5,_0x4b2678,_0xe56d33){const _0x490482=_0x4b2054;this[_0x490482(0x1d0)][_0x490482(0x1ed)](_0x30cfb5,_0x4b2678,_0xe56d33);}[_0x4b2054(0x204)](_0xfcc63d){const _0x37ce56=_0x4b2054;this[_0x37ce56(0x1fa)][_0x37ce56(0x204)](_0xfcc63d);}[_0x4b2054(0x1d1)](_0xa31bc7){const _0x53cf9f=_0x4b2054;this[_0x53cf9f(0x1fa)][_0x53cf9f(0x1d1)](_0xa31bc7);}[_0x4b2054(0x1de)](){const _0x7aeffe=_0x4b2054;this[_0x7aeffe(0x1f9)][_0x7aeffe(0x20a)]();}[_0x4b2054(0x1c4)](_0x1eadde){const _0x56a11e=_0x4b2054;this[_0x56a11e(0x1d0)][_0x56a11e(0x1c4)](_0x1eadde);}[_0x4b2054(0x1e8)](_0x36e1a6){const _0xe2f6c7=_0x4b2054;this[_0xe2f6c7(0x1f9)][_0xe2f6c7(0x1ff)](_0x36e1a6);}[_0x4b2054(0x1d2)](_0x146b76,_0x220693){const _0x3f15d7=_0x4b2054;this[_0x3f15d7(0x1fa)][_0x3f15d7(0x1d2)](_0x146b76,_0x220693);}[_0x4b2054(0x1ec)](_0x14ae75){const _0x39c680=_0x4b2054;_0x14ae75?(this[_0x39c680(0x1c7)]=!0x0,this[_0x39c680(0x1fa)][_0x39c680(0x1ec)](_0x14ae75)):this[_0x39c680(0x1c7)]=!0x1;}[_0x4b2054(0x207)](){const _0x5efd56=_0x4b2054;this[_0x5efd56(0x1fa)][_0x5efd56(0x207)]();}[_0x4b2054(0x1e7)](_0x39ff65){const _0x153c24=_0x4b2054;this[_0x153c24(0x1fa)][_0x153c24(0x1e7)](_0x39ff65);}[_0x4b2054(0x1df)](_0x1402b8,_0xd467b1,_0x50a5f5,_0x22fc7d){const _0x22a0d1=_0x4b2054;this[_0x22a0d1(0x1d0)][_0x22a0d1(0x1df)](_0x1402b8,_0xd467b1,_0x50a5f5,_0x22fc7d);}[_0x4b2054(0x1da)](_0x298182){const _0x5cd0da=_0x4b2054;this[_0x5cd0da(0x1d0)][_0x5cd0da(0x1da)](_0x298182);}[_0x4b2054(0x1d4)](_0x39ba21=!0x1){const _0x20b8b7=_0x4b2054;this[_0x20b8b7(0x1f9)][_0x20b8b7(0x1d7)](_0x39ba21);}[_0x4b2054(0x1ee)](_0x481460){const _0x9ee389=_0x4b2054;this[_0x9ee389(0x1f9)][_0x9ee389(0x208)][_0x9ee389(0x203)][_0x9ee389(0x20a)](),this[_0x9ee389(0x1f9)][_0x9ee389(0x208)][_0x9ee389(0x203)][_0x9ee389(0x1c6)]=_0x481460;}}class _s extends _0x489404{constructor(_0x577d9f){const _0x4064d1=_0x4b2054;super(_0x577d9f);const _0x6de4f6=new _0x23a1d5(_0x577d9f);_0x6de4f6[_0x4064d1(0x1e3)]({'label':_0xba7497(this[_0x4064d1(0x1dc)],_0x4064d1(0x1fe)),'withText':!0x0,'class':[_0x4064d1(0x1d3)],'tooltip':''}),_0x6de4f6[_0x4064d1(0x1ea)](_0x4064d1(0x201))['to'](this,_0x4064d1(0x212)),this[_0x4064d1(0x1c8)]({'tag':_0x4064d1(0x1cc),'attributes':{'class':['ck',_0x4064d1(0x1fb)]},'children':[{'tag':'p','children':[{'text':_0xba7497(this[_0x4064d1(0x1dc)],_0x4064d1(0x1ce))+'\x20'},_0x6de4f6]}]});}}
23
+ const _0x28fe80=_0x2bf9;function _0x2bf9(_0x3fec14,_0x1ba2fe){const _0x19637f=_0x1963();return _0x2bf9=function(_0x2bf9c7,_0x34a3d8){_0x2bf9c7=_0x2bf9c7-0x103;let _0x336745=_0x19637f[_0x2bf9c7];return _0x336745;},_0x2bf9(_0x3fec14,_0x1ba2fe);}(function(_0x23ec3c,_0x2ccc96){const _0x482e0a=_0x2bf9,_0x216e6a=_0x23ec3c();while(!![]){try{const _0x1e6ecd=parseInt(_0x482e0a(0x13f))/0x1+-parseInt(_0x482e0a(0x14d))/0x2*(parseInt(_0x482e0a(0x10b))/0x3)+-parseInt(_0x482e0a(0x144))/0x4+-parseInt(_0x482e0a(0x137))/0x5*(parseInt(_0x482e0a(0x106))/0x6)+-parseInt(_0x482e0a(0x139))/0x7*(parseInt(_0x482e0a(0x12d))/0x8)+-parseInt(_0x482e0a(0x152))/0x9*(parseInt(_0x482e0a(0x136))/0xa)+parseInt(_0x482e0a(0x10c))/0xb*(parseInt(_0x482e0a(0x147))/0xc);if(_0x1e6ecd===_0x2ccc96)break;else _0x216e6a['push'](_0x216e6a['shift']());}catch(_0x594f3e){_0x216e6a['push'](_0x216e6a['shift']());}}}(_0x1963,0xb2f51));import{ButtonView as _0x444530,clickOutsideHandler as _0x5144b6,View as _0x1715f5}from'ckeditor5/src/ui.js';import{AIChatPromptInputView as _0x39b16c}from'./controls/aichatpromptinputview.js';import{AIChatPromptCapabilitiesView as _0x2da390}from'./controls/aichatpromptcapabilitiesview.js';import{AIChatContextPanelView as _0x33a858,CONTEXT_PANEL_VIEW_EVENT_NAMES as _0x52e9ef}from'./controls/aichatcontextpanelview.js';import{AIChatControlsLoaderView as _0x50c3aa}from'./controls/aichatcontrolsloaderview.js';import{getTranslation as _0x4c16b0}from'../../aicore/utils/common-translations.js';function _0x1963(){const _0x38e41f=['bodyCollection','872qrtXTf','value','queryView','ck-ai-chat-controls__start-new-chat-button','clearConversationContextUI','_createPromptInputView','_promptCapabilitiesView','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_BUTTON','_handlePromptInputFocus','30oHJHLC','1695gyjnpC','toggleWebSearch','41097KvDuuP','setPlaceholderText','removeContextItem','disableModelSelector','locale','setReasoning','106132SSAMSa','setModel','setConversationContext','clearPendingContextUI','setTemplate','5753296Mnznsr','setIsUploadInProgress','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_TEXT','3804cBQMFb','addContextItem','_shouldRestorePromptInputFocus','resetMessageInput','reset','_contextPanelView','3846ZRQqKT','startConversation','enableModelSelector','setInputPlaceholder','closeSourceResourceBalloon','964107sXwqlk','fieldView','element','setModelList','clearCurrentContextItems','populateSourceResourceBalloon','clearConversationContextItems','8292YlcjRx','contextResourcesSearchInputVisibleFrom','_createContextPanelView','setWebSearch','execute','894baoNXl','141163uxfLXn','setAddContextOptions','_modelUnavailableMessageView','focus','div','delegate','setPromptInputValue','toggleReasoning','setContextItemLoading','isModelAvailable','_loaderView','sendUserMessage','updateResourceState','abortPromptStream','change:isLoading','ck-ai-chat-controls-disabled','addContextButtonView','isLoading','set','form','_createPromptCapabilitiesView','ck-hidden','bindTemplate','focusPromptInput','isDisabled','_promptInputView','_createLoaderView','_createModelUnavailableMessageView','ck-ai-chat-controls','ck-ai-chat-controls-model-unavailable-message','selectModel','low'];_0x1963=function(){return _0x38e41f;};return _0x1963();}import'../../../theme/aichat/aichat-controls.css';import'../../../theme/aichat/aichat-controls/prompt-input.css';import'../../../theme/aichat/aichat-controls/prompt-capabilities.css';import'../../../theme/aichat/aichat-controls/model-unavailable-message.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls.css';import'../../../theme/aichat/aichat-controls/aichat-context-chip.css';import'../../../theme/aichat/aichat-controls/aichat-controls-button.css';import'../../../theme/aichat/aichat-controls/aichat-controls-loader.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css';export class AIChatControlsView extends _0x1715f5{[_0x28fe80(0x14c)];[_0x28fe80(0x125)];[_0x28fe80(0x133)];[_0x28fe80(0x116)];[_0x28fe80(0x10e)];[_0x28fe80(0x149)];constructor(_0x8887ea,_0x153510){const _0xc8b84d=_0x28fe80;super(_0x8887ea),this[_0xc8b84d(0x14c)]=this[_0xc8b84d(0x108)](_0x8887ea,{'bodyCollection':_0x153510[_0xc8b84d(0x12c)],'searchInputVisibleFrom':_0x153510[_0xc8b84d(0x107)]}),this[_0xc8b84d(0x125)]=this[_0xc8b84d(0x132)](_0x8887ea),this[_0xc8b84d(0x133)]=this[_0xc8b84d(0x120)](_0x8887ea),this[_0xc8b84d(0x116)]=this[_0xc8b84d(0x126)](_0x8887ea),this[_0xc8b84d(0x10e)]=this[_0xc8b84d(0x127)](_0x8887ea),this[_0xc8b84d(0x149)]=!0x1,this[_0xc8b84d(0x125)][_0xc8b84d(0x111)](_0xc8b84d(0x117))['to'](this),this[_0xc8b84d(0x116)][_0xc8b84d(0x111)](_0xc8b84d(0x119))['to'](this),this[_0xc8b84d(0x133)][_0xc8b84d(0x111)](_0xc8b84d(0x138))['to'](this),this[_0xc8b84d(0x133)][_0xc8b84d(0x111)](_0xc8b84d(0x113))['to'](this),this[_0xc8b84d(0x133)][_0xc8b84d(0x111)](_0xc8b84d(0x12a))['to'](this),this[_0xc8b84d(0x14c)][_0xc8b84d(0x111)](..._0x52e9ef)['to'](this),this[_0xc8b84d(0x11e)](_0xc8b84d(0x115),!0x0),this[_0xc8b84d(0x11e)](_0xc8b84d(0x124),!0x1);const _0x464e7b=this[_0xc8b84d(0x122)];this[_0xc8b84d(0x143)]({'tag':_0xc8b84d(0x11f),'attributes':{'class':['ck',_0xc8b84d(0x128),_0x464e7b['if'](_0xc8b84d(0x124),_0xc8b84d(0x11b))]},'children':[{'tag':_0xc8b84d(0x110),'attributes':{'class':[_0x464e7b['if'](_0xc8b84d(0x11d),_0xc8b84d(0x121),_0x11cdb2=>_0x11cdb2||!this[_0xc8b84d(0x115)]),_0x464e7b['if'](_0xc8b84d(0x115),_0xc8b84d(0x121),_0x5aa1f9=>!_0x5aa1f9||this[_0xc8b84d(0x11d)])]},'children':[this[_0xc8b84d(0x14c)],this[_0xc8b84d(0x125)],this[_0xc8b84d(0x133)]]},{'tag':_0xc8b84d(0x110),'attributes':{'class':[_0x464e7b['if'](_0xc8b84d(0x11d),_0xc8b84d(0x121),_0x315b25=>!_0x315b25)]},'children':[this[_0xc8b84d(0x116)]]},{'tag':_0xc8b84d(0x110),'attributes':{'class':[_0x464e7b['if'](_0xc8b84d(0x115),_0xc8b84d(0x121),_0x2e941b=>_0x2e941b)]},'children':[this[_0xc8b84d(0x10e)]]}]}),_0x5144b6({'emitter':this[_0xc8b84d(0x125)],'activator':()=>this[_0xc8b84d(0x11d)],'contextElements':()=>[this[_0xc8b84d(0x154)]],'callback':()=>{const _0x1e09b6=_0xc8b84d;this[_0x1e09b6(0x149)]=!0x1;}}),this['on'](_0xc8b84d(0x11a),this[_0xc8b84d(0x135)],{'priority':_0xc8b84d(0x12b)});}[_0x28fe80(0x108)](_0x393ec1,_0x48a5bb){return new _0x33a858(_0x393ec1,_0x48a5bb);}[_0x28fe80(0x132)](_0x30ed70){const _0x55df01=_0x28fe80;return new _0x39b16c(_0x30ed70,this[_0x55df01(0x14c)][_0x55df01(0x11c)]);}[_0x28fe80(0x120)](_0x258d3e){return new _0x2da390(_0x258d3e);}[_0x28fe80(0x126)](_0x3c119b){return new _0x50c3aa(_0x3c119b);}[_0x28fe80(0x127)](_0x2a97ae){const _0x59d823=_0x28fe80,_0x28d738=new As(_0x2a97ae);return _0x28d738[_0x59d823(0x111)](_0x59d823(0x14e))['to'](this),_0x28d738;}[_0x28fe80(0x135)](_0x113dd3,_0x170d9c,_0x2b635f){const _0x22d1b8=_0x28fe80;_0x2b635f?this[_0x22d1b8(0x149)]=!0x0:this[_0x22d1b8(0x149)]&&this[_0x22d1b8(0x125)][_0x22d1b8(0x10f)]();}[_0x28fe80(0x148)](_0x52be1c,_0x429734){const _0x5eb5b5=_0x28fe80;this[_0x5eb5b5(0x14c)][_0x5eb5b5(0x148)](_0x52be1c,_0x429734);}[_0x28fe80(0x13b)](_0x4d4c89){const _0x595258=_0x28fe80;this[_0x595258(0x14c)][_0x595258(0x13b)](_0x4d4c89);}[_0x28fe80(0x114)](_0x28de4e,_0x3ab429){const _0x1b6d4b=_0x28fe80;this[_0x1b6d4b(0x14c)][_0x1b6d4b(0x114)](_0x28de4e,_0x3ab429);}[_0x28fe80(0x145)](_0x58d559){const _0x178606=_0x28fe80;this[_0x178606(0x125)][_0x178606(0x145)](_0x58d559);}[_0x28fe80(0x141)](_0x4c9bb7){const _0x3f0ddf=_0x28fe80;this[_0x3f0ddf(0x14c)][_0x3f0ddf(0x141)](_0x4c9bb7);}[_0x28fe80(0x142)](){const _0x4903d3=_0x28fe80;this[_0x4903d3(0x14c)][_0x4903d3(0x103)]();}[_0x28fe80(0x131)](){const _0x3481e1=_0x28fe80;this[_0x3481e1(0x14c)][_0x3481e1(0x105)]();}[_0x28fe80(0x118)](_0x48070c,_0x59c2c0,_0x5b3f1c){const _0x2156ea=_0x28fe80;this[_0x2156ea(0x14c)][_0x2156ea(0x118)](_0x48070c,_0x59c2c0,_0x5b3f1c);}[_0x28fe80(0x109)](_0x4a4655){const _0x2bc7df=_0x28fe80;this[_0x2bc7df(0x133)][_0x2bc7df(0x109)](_0x4a4655);}[_0x28fe80(0x13e)](_0x341e6d){const _0x28cb5d=_0x28fe80;this[_0x28cb5d(0x133)][_0x28cb5d(0x13e)](_0x341e6d);}[_0x28fe80(0x14a)](){const _0x32ca83=_0x28fe80;this[_0x32ca83(0x125)][_0x32ca83(0x14b)]();}[_0x28fe80(0x10d)](_0xdd3537){const _0x33fb69=_0x28fe80;this[_0x33fb69(0x14c)][_0x33fb69(0x10d)](_0xdd3537);}[_0x28fe80(0x150)](_0x5192cc){const _0x64e647=_0x28fe80;this[_0x64e647(0x125)][_0x64e647(0x13a)](_0x5192cc);}[_0x28fe80(0x155)](_0x260163,_0x211023){const _0x4207d7=_0x28fe80;this[_0x4207d7(0x133)][_0x4207d7(0x155)](_0x260163,_0x211023);}[_0x28fe80(0x140)](_0x628e42){const _0x1ad900=_0x28fe80;_0x628e42?(this[_0x1ad900(0x115)]=!0x0,this[_0x1ad900(0x133)][_0x1ad900(0x140)](_0x628e42)):this[_0x1ad900(0x115)]=!0x1;}[_0x28fe80(0x14f)](){const _0x4f80c0=_0x28fe80;this[_0x4f80c0(0x133)][_0x4f80c0(0x14f)]();}[_0x28fe80(0x13c)](_0x9b81d8){const _0x4ceb9f=_0x28fe80;this[_0x4ceb9f(0x133)][_0x4ceb9f(0x13c)](_0x9b81d8);}[_0x28fe80(0x104)](_0x43e4ab,_0x23617b,_0x67a08d,_0x5ce48b){const _0x31bfa8=_0x28fe80;this[_0x31bfa8(0x14c)][_0x31bfa8(0x104)](_0x43e4ab,_0x23617b,_0x67a08d,_0x5ce48b);}[_0x28fe80(0x151)](_0x3ca284){const _0x14e896=_0x28fe80;this[_0x14e896(0x14c)][_0x14e896(0x151)](_0x3ca284);}[_0x28fe80(0x123)](_0x8ac1da=!0x1){const _0x10a467=_0x28fe80;this[_0x10a467(0x125)][_0x10a467(0x10f)](_0x8ac1da);}[_0x28fe80(0x112)](_0x49e2b9){const _0x148462=_0x28fe80;this[_0x148462(0x125)][_0x148462(0x12f)][_0x148462(0x153)][_0x148462(0x14b)](),this[_0x148462(0x125)][_0x148462(0x12f)][_0x148462(0x153)][_0x148462(0x12e)]=_0x49e2b9;}}class As extends _0x1715f5{constructor(_0x5c2f96){const _0x119237=_0x28fe80;super(_0x5c2f96);const _0x349277=new _0x444530(_0x5c2f96);_0x349277[_0x119237(0x11e)]({'label':_0x4c16b0(this[_0x119237(0x13d)],_0x119237(0x134)),'withText':!0x0,'class':[_0x119237(0x130)],'tooltip':''}),_0x349277[_0x119237(0x111)](_0x119237(0x10a))['to'](this,_0x119237(0x14e)),this[_0x119237(0x143)]({'tag':_0x119237(0x110),'attributes':{'class':['ck',_0x119237(0x129)]},'children':[{'tag':'p','children':[{'text':_0x4c16b0(this[_0x119237(0x13d)],_0x119237(0x146))+'\x20'},_0x349277]}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x37a5bd=_0x3857;(function(_0x3800e0,_0x28cf15){const _0xb063c=_0x3857,_0x37814e=_0x3800e0();while(!![]){try{const _0x2c215b=-parseInt(_0xb063c(0x121))/0x1*(parseInt(_0xb063c(0x125))/0x2)+-parseInt(_0xb063c(0x140))/0x3+-parseInt(_0xb063c(0x15b))/0x4*(-parseInt(_0xb063c(0x13b))/0x5)+-parseInt(_0xb063c(0x120))/0x6+-parseInt(_0xb063c(0x147))/0x7*(parseInt(_0xb063c(0x163))/0x8)+-parseInt(_0xb063c(0x11d))/0x9*(-parseInt(_0xb063c(0x122))/0xa)+parseInt(_0xb063c(0x15d))/0xb*(parseInt(_0xb063c(0x119))/0xc);if(_0x2c215b===_0x28cf15)break;else _0x37814e['push'](_0x37814e['shift']());}catch(_0x2f4e18){_0x37814e['push'](_0x37814e['shift']());}}}(_0x1d8d,0x63aa4));import{CKEditorError as _0x26a3f9,logWarning as _0x53aa83,scrollAncestorsToShowTarget as _0x19ef3f}from'ckeditor5/src/utils.js';function _0x3857(_0x1ea4b8,_0x5f20d){const _0x1d8dc0=_0x1d8d();return _0x3857=function(_0x3857b9,_0x405640){_0x3857b9=_0x3857b9-0x10c;let _0x5741c8=_0x1d8dc0[_0x3857b9];return _0x5741c8;},_0x3857(_0x1ea4b8,_0x5f20d);}import{View as _0x318f78}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x800ac9}from'../utils/eventnames.js';import{AIChatFeedSuggestionItemView as _0x1da4f3}from'./feed/aichatfeedsuggestionitemview.js';import{AIChatFeedReplyItemView as _0x509507}from'./feed/aichatfeedreplyitemview.js';import{AIChatFeedUserMessageItemView as _0x3c2cf5}from'./feed/aichatfeedusermessageitem.js';import{AIChatFeedErrorItemView as _0x554ebb}from'./feed/aichatfeederroritemview.js';import{AIChatFeedInteractionHeaderView as _0xd6d86c}from'./feed/aichatfeedinteractionheaderview.js';import{ScrollManager as _0xc7e12e}from'../../aicore/utils/scrollmanager.js';import{AISkeletonView as _0x5b418c,SKELETON_DEFINITIONS as _0x9a9548}from'../../aicore/ui/aiskeleton.js';import{AISpinnerView as _0x40c709}from'../../aicore/ui/aispinner.js';import{AIChatFeedCustomElementView as _0x16b76b}from'./feed/aichatfeedcustomelementview.js';import'../../../theme/aichat/aichatfeed.css';function _0x1d8d(){const _0x2b800c=['_createLoaderChildren','10PWUYZV','ai-chat-feed-view-item-not-a-suggestion-or-reply-item','_createTemplateChildren','_setupTemplate','createCollection','ai-chat-feed-view-item-not-a-suggestion-item','ck-ai-chat__loader','updateSuggestionItem','addItem','ck-ai-chat-feed-view-scroll-to-suggestion-part-view-not-found','add','forEach','scrollManager','user-message','element','remove','ai-suggestion-reply','start','ai-chat-feed-view-item-not-a-reply-item','aiFeed','delegate','ck-ai-chat__feed__items','90QnyHuM','locale','interaction-header','stop','toggleLoadingSkeleton','821967fKseMg','ai-chat-feed-view-item-not-found','bindTemplate','updatePartState','_bodyCollection','ai-reply','extendTemplate','459641urnUPg','setSuggestionPartActive','custom-element','_createFeedItems','bind','find','updateWebSources','set','filter','removeItem','ck-ai-chat__feed','markItemAsDone','markAsDone','includes','ck-ai-chat-feed-view-scroll-to-suggestion-invalid-item','children','updateSuggestionPartState','div','stopAutoScroll','updateSources','110988jCAFIS','setTemplate','5060MYjXet','map','_createSkeletonLoader','getItemById','scrollToSuggestion','hasItem','40sQaVSP','setLoadingMessage','isVisible','loadingMessage','clear','setPartActive','getItemIds','ck-hidden','isTrackChangesOn','startAutoScroll','getPartView','ck-ai-chat__loader-text','options','_createFeedLoader','parentElement','isPending','25284yOdCBL','destroy','isLoadingSkeletonVisible','updateReplyItem','621MIvtjY','span','updateContent','210978qQgLXo','142637oQDIbV','42060SdmyaQ','render'];_0x1d8d=function(){return _0x2b800c;};return _0x1d8d();}export class AIChatFeedView extends _0x318f78{[_0x37a5bd(0x156)];[_0x37a5bd(0x131)];[_0x37a5bd(0x144)];constructor(_0x2f4fef,_0x5688e6){const _0x5821fa=_0x37a5bd;super(_0x2f4fef),this[_0x5821fa(0x144)]=_0x5688e6,this[_0x5821fa(0x14e)](_0x5821fa(0x118),!0x1),this[_0x5821fa(0x14e)](_0x5821fa(0x10c),''),this[_0x5821fa(0x14e)](_0x5821fa(0x11b),!0x1),this[_0x5821fa(0x14e)](_0x5821fa(0x111),!0x1),this[_0x5821fa(0x156)]=this[_0x5821fa(0x129)](),this[_0x5821fa(0x156)][_0x5821fa(0x139)](..._0x800ac9)['to'](this),this[_0x5821fa(0x128)]();}[_0x37a5bd(0x123)](){const _0x5c666e=_0x37a5bd;super[_0x5c666e(0x123)](),this[_0x5c666e(0x131)]=new _0xc7e12e(this[_0x5c666e(0x133)]);}[_0x37a5bd(0x11a)](){const _0x229646=_0x37a5bd;super[_0x229646(0x11a)](),this[_0x229646(0x131)][_0x229646(0x11a)]();}[_0x37a5bd(0x10d)](){const _0x1d8fea=_0x37a5bd;this[_0x1d8fea(0x156)][_0x1d8fea(0x10d)]();}[_0x37a5bd(0x12d)](_0x586576,_0x49d125){const _0x24b91e=_0x37a5bd;let _0x1c0942;return _0x24b91e(0x145)===_0x586576?_0x1c0942=new _0x509507(this[_0x24b91e(0x13c)],_0x49d125,this[_0x24b91e(0x144)]):_0x24b91e(0x135)===_0x586576?(_0x1c0942=new _0x1da4f3(this[_0x24b91e(0x13c)],_0x49d125,this[_0x24b91e(0x144)]),_0x1c0942[_0x24b91e(0x14b)](_0x24b91e(0x111))['to'](this)):_0x1c0942=_0x24b91e(0x132)===_0x586576?new _0x3c2cf5(this[_0x24b91e(0x13c)],_0x49d125,this[_0x24b91e(0x144)]):_0x24b91e(0x13d)===_0x586576?new _0xd6d86c(this[_0x24b91e(0x13c)],_0x49d125):_0x24b91e(0x149)===_0x586576?new _0x16b76b(_0x49d125):new _0x554ebb(_0x49d125),this[_0x24b91e(0x156)][_0x24b91e(0x12f)](_0x1c0942),_0x1c0942;}async[_0x37a5bd(0x11c)]({id:_0x42fc8c,parsedContent:_0x1a730c,renderingStrategy:_0x642a27,abortSignal:_0xf5ae5f}){const _0x343dea=_0x37a5bd,_0x5c4a89=this[_0x343dea(0x160)](_0x42fc8c);if(!(_0x5c4a89 instanceof _0x509507))throw new _0x26a3f9(_0x343dea(0x137),null,{'itemView':_0x5c4a89,'id':_0x42fc8c,'parsedContent':_0x1a730c});await _0x5c4a89[_0x343dea(0x11f)]({'parsedContent':_0x1a730c,'renderingStrategy':_0x642a27,'abortSignal':_0xf5ae5f});}async[_0x37a5bd(0x14d)](_0x418f8b,_0x425aa2){const _0x448f70=_0x37a5bd,_0x427f80=this[_0x448f70(0x160)](_0x418f8b);if(_0x427f80 instanceof _0x1da4f3)_0x427f80[_0x448f70(0x15a)](_0x425aa2);else{if(!(_0x427f80 instanceof _0x509507))throw new _0x26a3f9(_0x448f70(0x126),null,{'itemView':_0x427f80,'id':_0x418f8b,'sources':_0x425aa2});_0x427f80[_0x448f70(0x15a)](_0x425aa2);}}async[_0x37a5bd(0x12c)]({id:_0x419605,parts:_0x2c512e,renderingStrategy:_0x12d9ba,abortSignal:_0x33af34}){const _0x337a71=_0x37a5bd,_0x52598b=this[_0x337a71(0x160)](_0x419605);if(!(_0x52598b instanceof _0x1da4f3))throw new _0x26a3f9(_0x337a71(0x12a),null,{'itemView':_0x52598b,'id':_0x419605,'parts':_0x2c512e});await _0x52598b[_0x337a71(0x11f)]({'parts':_0x2c512e,'renderingStrategy':_0x12d9ba,'abortSignal':_0x33af34});}[_0x37a5bd(0x157)]({id:_0xa446d1,index:_0x5e02e6,state:_0x19183b}){const _0x112484=_0x37a5bd,_0x5b5a63=this[_0x112484(0x160)](_0xa446d1);if(!(_0x5b5a63 instanceof _0x1da4f3))throw new _0x26a3f9(_0x112484(0x12a),this,{'id':_0xa446d1});_0x5b5a63[_0x112484(0x143)](_0x5e02e6,_0x19183b);}[_0x37a5bd(0x148)]({id:_0x2affc2,index:_0x51d8ed,isActive:_0x46f4bc}){const _0x306eda=_0x37a5bd,_0x126579=this[_0x306eda(0x160)](_0x2affc2);if(!(_0x126579 instanceof _0x1da4f3))throw new _0x26a3f9(_0x306eda(0x12a),this,{'id':_0x2affc2});this[_0x306eda(0x156)][_0x306eda(0x14f)](_0x1f1c7c=>_0x1f1c7c instanceof _0x1da4f3)[_0x306eda(0x130)](_0xb2b978=>{const _0x12a58b=_0x306eda;_0xb2b978[_0x12a58b(0x10e)](!0x1);}),_0x126579[_0x306eda(0x10e)](_0x51d8ed,_0x46f4bc);}[_0x37a5bd(0x152)](_0x444322){const _0x423d30=_0x37a5bd;this[_0x423d30(0x160)](_0x444322)[_0x423d30(0x153)]();}[_0x37a5bd(0x10f)](){const _0x175c54=_0x37a5bd;return this[_0x175c54(0x156)][_0x175c54(0x15e)](_0x27d4e9=>_0x27d4e9[_0x175c54(0x115)]['id']);}[_0x37a5bd(0x150)](_0x5c3671){const _0x4a952d=_0x37a5bd;this[_0x4a952d(0x156)][_0x4a952d(0x134)](this[_0x4a952d(0x160)](_0x5c3671));}[_0x37a5bd(0x162)](_0x334cca){const _0x452d24=_0x37a5bd;return!!this[_0x452d24(0x156)][_0x452d24(0x14c)](_0x4166c8=>_0x4166c8[_0x452d24(0x115)]['id'][_0x452d24(0x154)](_0x334cca));}[_0x37a5bd(0x161)](_0x29be0c,_0x76442e){const _0x242752=_0x37a5bd,_0x22ef1c=this[_0x242752(0x160)](_0x29be0c);if(!(_0x22ef1c instanceof _0x1da4f3))return void _0x53aa83(_0x242752(0x155),{'replyId':_0x29be0c,'partIndex':_0x76442e});const _0x24ce3e=_0x22ef1c[_0x242752(0x113)](_0x76442e);_0x24ce3e?_0x19ef3f(_0x24ce3e[_0x242752(0x133)],0x14,this[_0x242752(0x133)][_0x242752(0x117)],!0x0,!0x0):_0x53aa83(_0x242752(0x12e),{'replyId':_0x29be0c,'partIndex':_0x76442e});}[_0x37a5bd(0x128)](){const _0x382d39=_0x37a5bd;this[_0x382d39(0x15c)]({'tag':_0x382d39(0x158),'attributes':{'class':['ck',_0x382d39(0x151)]},'children':this[_0x382d39(0x127)]()});}[_0x37a5bd(0x127)](){const _0x39925f=_0x37a5bd,_0xcd8fba=this[_0x39925f(0x15f)]();return[this[_0x39925f(0x14a)](),_0xcd8fba,this[_0x39925f(0x116)]()];}[_0x37a5bd(0x15f)](){const _0x5f48c1=_0x37a5bd,_0x5e52c6=new _0x5b418c(this[_0x5f48c1(0x13c)],_0x9a9548[_0x5f48c1(0x138)]);return _0x5e52c6[_0x5f48c1(0x146)]({'attributes':{'class':[this[_0x5f48c1(0x142)]['if'](_0x5f48c1(0x11b),_0x5f48c1(0x110),_0x5e9c40=>!_0x5e9c40)]}}),_0x5e52c6;}[_0x37a5bd(0x14a)](){const _0x25cb30=_0x37a5bd,_0x4a4ad4=new _0x318f78(this[_0x25cb30(0x13c)]);return _0x4a4ad4[_0x25cb30(0x15c)]({'tag':_0x25cb30(0x158),'attributes':{'class':['ck',_0x25cb30(0x13a),this[_0x25cb30(0x142)]['if'](_0x25cb30(0x11b),_0x25cb30(0x110))]},'children':this[_0x25cb30(0x156)]}),_0x4a4ad4;}[_0x37a5bd(0x116)](){const _0x21fa2f=_0x37a5bd,_0x5a7c0c=new _0x318f78(this[_0x21fa2f(0x13c)]);return _0x5a7c0c[_0x21fa2f(0x15c)]({'tag':_0x21fa2f(0x158),'attributes':{'class':['ck',_0x21fa2f(0x12b),this[_0x21fa2f(0x142)]['if'](_0x21fa2f(0x118),_0x21fa2f(0x110),_0x1220f5=>!_0x1220f5)]},'children':this[_0x21fa2f(0x124)]()}),_0x5a7c0c;}[_0x37a5bd(0x124)](){const _0x185c77=_0x37a5bd,_0x41e1df=new _0x40c709();return _0x41e1df[_0x185c77(0x165)]=!0x0,[_0x41e1df,{'tag':_0x185c77(0x11e),'attributes':{'class':['ck',_0x185c77(0x114)]},'children':[{'text':this[_0x185c77(0x142)]['to'](_0x185c77(0x10c))}]}];}[_0x37a5bd(0x160)](_0x50cac8){const _0x36f996=_0x37a5bd,_0x56c8e5=this[_0x36f996(0x156)][_0x36f996(0x14c)](_0xda1508=>_0xda1508[_0x36f996(0x115)]['id'][_0x36f996(0x154)](_0x50cac8));if(!_0x56c8e5)throw new _0x26a3f9(_0x36f996(0x141),this,{'id':_0x50cac8});return _0x56c8e5;}[_0x37a5bd(0x164)](_0x752020){const _0x54f0ef=_0x37a5bd;this[_0x54f0ef(0x14e)](_0x54f0ef(0x10c),_0x752020);}[_0x37a5bd(0x13f)](_0x2fb055){const _0x365972=_0x37a5bd;this[_0x365972(0x14e)](_0x365972(0x11b),_0x2fb055);}[_0x37a5bd(0x112)](){const _0x5a19dc=_0x37a5bd;this[_0x5a19dc(0x131)][_0x5a19dc(0x136)]();}[_0x37a5bd(0x159)](){const _0x3600b3=_0x37a5bd;this[_0x3600b3(0x131)][_0x3600b3(0x13e)]();}}
23
+ const _0x524238=_0x5276;function _0x5276(_0x15978f,_0x329341){const _0x76f38f=_0x76f3();return _0x5276=function(_0x527631,_0x196acd){_0x527631=_0x527631-0x1e3;let _0x258ed8=_0x76f38f[_0x527631];return _0x258ed8;},_0x5276(_0x15978f,_0x329341);}(function(_0x5e157b,_0x15c730){const _0x9bb264=_0x5276,_0x143a84=_0x5e157b();while(!![]){try{const _0x2197c0=-parseInt(_0x9bb264(0x22c))/0x1*(parseInt(_0x9bb264(0x22f))/0x2)+parseInt(_0x9bb264(0x1fe))/0x3*(-parseInt(_0x9bb264(0x200))/0x4)+parseInt(_0x9bb264(0x234))/0x5+parseInt(_0x9bb264(0x220))/0x6+-parseInt(_0x9bb264(0x22d))/0x7*(parseInt(_0x9bb264(0x1ed))/0x8)+parseInt(_0x9bb264(0x23a))/0x9+parseInt(_0x9bb264(0x20d))/0xa;if(_0x2197c0===_0x15c730)break;else _0x143a84['push'](_0x143a84['shift']());}catch(_0x558b26){_0x143a84['push'](_0x143a84['shift']());}}}(_0x76f3,0xedc07));import{CKEditorError as _0x169d1b,logWarning as _0x35c12a,scrollAncestorsToShowTarget as _0x53e420}from'ckeditor5/src/utils.js';import{View as _0x32cd1e}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x58b324}from'../utils/eventnames.js';import{AIChatFeedSuggestionItemView as _0x2a7f44}from'./feed/aichatfeedsuggestionitemview.js';import{AIChatFeedReplyItemView as _0x3f72b3}from'./feed/aichatfeedreplyitemview.js';import{AIChatFeedUserMessageItemView as _0x1efb21}from'./feed/aichatfeedusermessageitem.js';import{AIChatFeedErrorItemView as _0x288764}from'./feed/aichatfeederroritemview.js';import{AIChatFeedInteractionHeaderView as _0x4ef52c}from'./feed/aichatfeedinteractionheaderview.js';import{ScrollManager as _0x334471}from'../../aicore/utils/scrollmanager.js';import{AISkeletonView as _0x2a1998,SKELETON_DEFINITIONS as _0x43cade}from'../../aicore/ui/aiskeleton.js';import{AISpinnerView as _0x376c47}from'../../aicore/ui/aispinner.js';function _0x76f3(){const _0x29cd36=['removeItem','remove','1705PrAtRG','869386LoHsKs','markItemAsDone','42HuJyRe','setSuggestionPartActive','stop','_createLoaderChildren','toggleLoadingSkeleton','1492935RsTRnS','ck-ai-chat-feed-view-scroll-to-suggestion-part-view-not-found','ai-reply','delegate','_bodyCollection','add','10946574NhJDNz','updateSuggestionPartState','bindTemplate','aiFeed','_createFeedLoader','hasItem','destroy','_setupTemplate','element','render','set','8LVxTcq','addItem','createCollection','updateSources','_createSkeletonLoader','interaction-header','isPending','filter','_createTemplateChildren','stopAutoScroll','ck-ai-chat__feed__items','getItemIds','options','extendTemplate','updatePartState','user-message','forEach','3995742wJsRwG','getItemById','4OFcZfr','locale','ai-chat-feed-view-item-not-found','ck-ai-chat__loader','updateReplyItem','getPartView','loadingMessage','ai-chat-feed-view-item-not-a-suggestion-or-reply-item','ck-ai-chat-feed-view-scroll-to-suggestion-invalid-item','ck-hidden','children','map','updateSuggestionItem','9402060hscGoe','scrollToSuggestion','ai-chat-feed-view-item-not-a-reply-item','find','updateWebSources','ck-ai-chat__feed','clear','scrollManager','bind','div','_createFeedItems','ai-chat-feed-view-item-not-a-suggestion-item','setLoadingMessage','ai-suggestion-reply','isTrackChangesOn','parentElement','ck-ai-chat__loader-text','setTemplate','markAsDone','64014ptXRmM','updateContent','startAutoScroll','custom-element','isVisible','start','span','includes','setPartActive','isLoadingSkeletonVisible'];_0x76f3=function(){return _0x29cd36;};return _0x76f3();}import{AIChatFeedCustomElementView as _0x12990d}from'./feed/aichatfeedcustomelementview.js';import'../../../theme/aichat/aichatfeed.css';export class AIChatFeedView extends _0x32cd1e{[_0x524238(0x20a)];[_0x524238(0x214)];[_0x524238(0x238)];constructor(_0xa2da71,_0x1112a5){const _0x1b21bc=_0x524238;super(_0xa2da71),this[_0x1b21bc(0x238)]=_0x1112a5,this[_0x1b21bc(0x1ec)](_0x1b21bc(0x1f3),!0x1),this[_0x1b21bc(0x1ec)](_0x1b21bc(0x206),''),this[_0x1b21bc(0x1ec)](_0x1b21bc(0x229),!0x1),this[_0x1b21bc(0x1ec)](_0x1b21bc(0x21b),!0x1),this[_0x1b21bc(0x20a)]=this[_0x1b21bc(0x1ef)](),this[_0x1b21bc(0x20a)][_0x1b21bc(0x237)](..._0x58b324)['to'](this),this[_0x1b21bc(0x1e9)]();}[_0x524238(0x1eb)](){const _0x206213=_0x524238;super[_0x206213(0x1eb)](),this[_0x206213(0x214)]=new _0x334471(this[_0x206213(0x1ea)]);}[_0x524238(0x1e8)](){const _0x2e395a=_0x524238;super[_0x2e395a(0x1e8)](),this[_0x2e395a(0x214)][_0x2e395a(0x1e8)]();}[_0x524238(0x213)](){const _0x1a272c=_0x524238;this[_0x1a272c(0x20a)][_0x1a272c(0x213)]();}[_0x524238(0x1ee)](_0x4ba229,_0x554915){const _0x2d368a=_0x524238;let _0x181ef2;return _0x2d368a(0x236)===_0x4ba229?_0x181ef2=new _0x3f72b3(this[_0x2d368a(0x201)],_0x554915,this[_0x2d368a(0x238)]):_0x2d368a(0x21a)===_0x4ba229?(_0x181ef2=new _0x2a7f44(this[_0x2d368a(0x201)],_0x554915,this[_0x2d368a(0x238)]),_0x181ef2[_0x2d368a(0x215)](_0x2d368a(0x21b))['to'](this)):_0x181ef2=_0x2d368a(0x1fc)===_0x4ba229?new _0x1efb21(this[_0x2d368a(0x201)],_0x554915,this[_0x2d368a(0x238)]):_0x2d368a(0x1f2)===_0x4ba229?new _0x4ef52c(this[_0x2d368a(0x201)],_0x554915):_0x2d368a(0x223)===_0x4ba229?new _0x12990d(_0x554915):new _0x288764(_0x554915),this[_0x2d368a(0x20a)][_0x2d368a(0x239)](_0x181ef2),_0x181ef2;}async[_0x524238(0x204)]({id:_0x1af4df,parsedContent:_0x3272e1,renderingStrategy:_0xa71188,abortSignal:_0x15fb4e}){const _0x33d78a=_0x524238,_0x483acd=this[_0x33d78a(0x1ff)](_0x1af4df);if(!(_0x483acd instanceof _0x3f72b3))throw new _0x169d1b(_0x33d78a(0x20f),null,{'itemView':_0x483acd,'id':_0x1af4df,'parsedContent':_0x3272e1});await _0x483acd[_0x33d78a(0x221)]({'parsedContent':_0x3272e1,'renderingStrategy':_0xa71188,'abortSignal':_0x15fb4e});}async[_0x524238(0x211)](_0x4994da,_0x2e9e56){const _0x519d2f=_0x524238,_0x44e3ec=this[_0x519d2f(0x1ff)](_0x4994da);if(_0x44e3ec instanceof _0x2a7f44)_0x44e3ec[_0x519d2f(0x1f0)](_0x2e9e56);else{if(!(_0x44e3ec instanceof _0x3f72b3))throw new _0x169d1b(_0x519d2f(0x207),null,{'itemView':_0x44e3ec,'id':_0x4994da,'sources':_0x2e9e56});_0x44e3ec[_0x519d2f(0x1f0)](_0x2e9e56);}}async[_0x524238(0x20c)]({id:_0x2c9d8c,parts:_0x6dada8,renderingStrategy:_0x528fd1,abortSignal:_0x3b721c}){const _0x545c4d=_0x524238,_0x296da7=this[_0x545c4d(0x1ff)](_0x2c9d8c);if(!(_0x296da7 instanceof _0x2a7f44))throw new _0x169d1b(_0x545c4d(0x218),null,{'itemView':_0x296da7,'id':_0x2c9d8c,'parts':_0x6dada8});await _0x296da7[_0x545c4d(0x221)]({'parts':_0x6dada8,'renderingStrategy':_0x528fd1,'abortSignal':_0x3b721c});}[_0x524238(0x1e3)]({id:_0x4d5902,index:_0x3cfbd5,state:_0x4cc1fa}){const _0xf8b5bb=_0x524238,_0x12434d=this[_0xf8b5bb(0x1ff)](_0x4d5902);if(!(_0x12434d instanceof _0x2a7f44))throw new _0x169d1b(_0xf8b5bb(0x218),this,{'id':_0x4d5902});_0x12434d[_0xf8b5bb(0x1fb)](_0x3cfbd5,_0x4cc1fa);}[_0x524238(0x230)]({id:_0x500927,index:_0x300d50,isActive:_0x394ec7}){const _0x1c0355=_0x524238,_0xc5218a=this[_0x1c0355(0x1ff)](_0x500927);if(!(_0xc5218a instanceof _0x2a7f44))throw new _0x169d1b(_0x1c0355(0x218),this,{'id':_0x500927});this[_0x1c0355(0x20a)][_0x1c0355(0x1f4)](_0x1b19b9=>_0x1b19b9 instanceof _0x2a7f44)[_0x1c0355(0x1fd)](_0x2f93bf=>{const _0x125c72=_0x1c0355;_0x2f93bf[_0x125c72(0x228)](!0x1);}),_0xc5218a[_0x1c0355(0x228)](_0x300d50,_0x394ec7);}[_0x524238(0x22e)](_0x30ee2d){const _0x530de4=_0x524238;this[_0x530de4(0x1ff)](_0x30ee2d)[_0x530de4(0x21f)]();}[_0x524238(0x1f8)](){const _0x14ff29=_0x524238;return this[_0x14ff29(0x20a)][_0x14ff29(0x20b)](_0x325e05=>_0x325e05[_0x14ff29(0x1f9)]['id']);}[_0x524238(0x22a)](_0x3bfde5){const _0x39e320=_0x524238;this[_0x39e320(0x20a)][_0x39e320(0x22b)](this[_0x39e320(0x1ff)](_0x3bfde5));}[_0x524238(0x1e7)](_0x3d8f7f){const _0x36a237=_0x524238;return!!this[_0x36a237(0x20a)][_0x36a237(0x210)](_0x291d45=>_0x291d45[_0x36a237(0x1f9)]['id'][_0x36a237(0x227)](_0x3d8f7f));}[_0x524238(0x20e)](_0x55cdc6,_0x1a28fa){const _0x504dff=_0x524238,_0x320a72=this[_0x504dff(0x1ff)](_0x55cdc6);if(!(_0x320a72 instanceof _0x2a7f44))return void _0x35c12a(_0x504dff(0x208),{'replyId':_0x55cdc6,'partIndex':_0x1a28fa});const _0x51c694=_0x320a72[_0x504dff(0x205)](_0x1a28fa);_0x51c694?_0x53e420(_0x51c694[_0x504dff(0x1ea)],0x14,this[_0x504dff(0x1ea)][_0x504dff(0x21c)],!0x0,!0x0):_0x35c12a(_0x504dff(0x235),{'replyId':_0x55cdc6,'partIndex':_0x1a28fa});}[_0x524238(0x1e9)](){const _0x5b3a76=_0x524238;this[_0x5b3a76(0x21e)]({'tag':_0x5b3a76(0x216),'attributes':{'class':['ck',_0x5b3a76(0x212)]},'children':this[_0x5b3a76(0x1f5)]()});}[_0x524238(0x1f5)](){const _0x4ebea7=_0x524238,_0x65a5a7=this[_0x4ebea7(0x1f1)]();return[this[_0x4ebea7(0x217)](),_0x65a5a7,this[_0x4ebea7(0x1e6)]()];}[_0x524238(0x1f1)](){const _0x306f20=_0x524238,_0x4a1dc4=new _0x2a1998(this[_0x306f20(0x201)],_0x43cade[_0x306f20(0x1e5)]);return _0x4a1dc4[_0x306f20(0x1fa)]({'attributes':{'class':[this[_0x306f20(0x1e4)]['if'](_0x306f20(0x229),_0x306f20(0x209),_0x24077d=>!_0x24077d)]}}),_0x4a1dc4;}[_0x524238(0x217)](){const _0x33a255=_0x524238,_0x5851fe=new _0x32cd1e(this[_0x33a255(0x201)]);return _0x5851fe[_0x33a255(0x21e)]({'tag':_0x33a255(0x216),'attributes':{'class':['ck',_0x33a255(0x1f7),this[_0x33a255(0x1e4)]['if'](_0x33a255(0x229),_0x33a255(0x209))]},'children':this[_0x33a255(0x20a)]}),_0x5851fe;}[_0x524238(0x1e6)](){const _0x59db82=_0x524238,_0x15b373=new _0x32cd1e(this[_0x59db82(0x201)]);return _0x15b373[_0x59db82(0x21e)]({'tag':_0x59db82(0x216),'attributes':{'class':['ck',_0x59db82(0x203),this[_0x59db82(0x1e4)]['if'](_0x59db82(0x1f3),_0x59db82(0x209),_0x1d2ddf=>!_0x1d2ddf)]},'children':this[_0x59db82(0x232)]()}),_0x15b373;}[_0x524238(0x232)](){const _0x67013d=_0x524238,_0x32eadf=new _0x376c47();return _0x32eadf[_0x67013d(0x224)]=!0x0,[_0x32eadf,{'tag':_0x67013d(0x226),'attributes':{'class':['ck',_0x67013d(0x21d)]},'children':[{'text':this[_0x67013d(0x1e4)]['to'](_0x67013d(0x206))}]}];}[_0x524238(0x1ff)](_0x56311b){const _0x52f3ba=_0x524238,_0x440171=this[_0x52f3ba(0x20a)][_0x52f3ba(0x210)](_0x22dcfd=>_0x22dcfd[_0x52f3ba(0x1f9)]['id'][_0x52f3ba(0x227)](_0x56311b));if(!_0x440171)throw new _0x169d1b(_0x52f3ba(0x202),this,{'id':_0x56311b});return _0x440171;}[_0x524238(0x219)](_0x1576f8){const _0x5dfade=_0x524238;this[_0x5dfade(0x1ec)](_0x5dfade(0x206),_0x1576f8);}[_0x524238(0x233)](_0x33a783){const _0x1e3d8b=_0x524238;this[_0x1e3d8b(0x1ec)](_0x1e3d8b(0x229),_0x33a783);}[_0x524238(0x222)](){const _0x3314c3=_0x524238;this[_0x3314c3(0x214)][_0x3314c3(0x225)]();}[_0x524238(0x1f6)](){const _0x303211=_0x524238;this[_0x303211(0x214)][_0x303211(0x231)]();}}