UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 5.21 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x4a7367=_0x57be;(function(_0x1e844b,_0x3ff25e){const _0x1607b4=_0x57be,_0x1fc325=_0x1e844b();while(!![]){try{const _0x51b9ef=parseInt(_0x1607b4(0x1e8))/0x1*(parseInt(_0x1607b4(0x1fa))/0x2)+parseInt(_0x1607b4(0x20d))/0x3+-parseInt(_0x1607b4(0x1e5))/0x4*(parseInt(_0x1607b4(0x203))/0x5)+-parseInt(_0x1607b4(0x1f8))/0x6+parseInt(_0x1607b4(0x1f1))/0x7*(-parseInt(_0x1607b4(0x1ef))/0x8)+-parseInt(_0x1607b4(0x1eb))/0x9*(parseInt(_0x1607b4(0x207))/0xa)+parseInt(_0x1607b4(0x1f6))/0xb*(parseInt(_0x1607b4(0x1ec))/0xc);if(_0x51b9ef===_0x3ff25e)break;else _0x1fc325['push'](_0x1fc325['shift']());}catch(_0x24401f){_0x1fc325['push'](_0x1fc325['shift']());}}}(_0x1762,0x2688c));function _0x57be(_0x5c76c4,_0x518c73){const _0x17623b=_0x1762();return _0x57be=function(_0x57be29,_0x518a82){_0x57be29=_0x57be29-0x1de;let _0x2ed6d9=_0x17623b[_0x57be29];return _0x2ed6d9;},_0x57be(_0x5c76c4,_0x518c73);}import{ContextPlugin as _0x1aaa8f}from'ckeditor5/src/core.js';import{AITabs as _0x4743f8}from'../aitabs/aitabs.js';import{IconAIHistory as _0x346aa1}from'ckeditor5/src/icons.js';import{AIChatHistoryView as _0x3fca21}from'./ui/aichathistoryview.js';import{getTranslation as _0x4035fe}from'../aicore/utils/common-translations.js';import'../../theme/aichat/aichathistory.css';export const AI_CHAT_HISTORY_UI_EVENT_NAMES=[_0x4a7367(0x1fb),_0x4a7367(0x20c),_0x4a7367(0x1f9),_0x4a7367(0x208),_0x4a7367(0x1f0),_0x4a7367(0x1ea),_0x4a7367(0x201)];function _0x1762(){const _0x39cd83=['requires','errorMessage','2090232dNcDIs','selectConversation','7BHQPBL','setIsMaximized','context','isOfficialPlugin','isLoading','22979spRkHG','isMaximized','1706028GLyyvZ','editConversationTitle','574988uOnJNe','showConversationHistory','showError','AITabs','view','history','showResizeButton','resizeTabs','AIChatHistoryUI','5qYuFSH','get','updateItemLoadingState','AI_CHAT_HISTORY_HEADING','1885690wvgcnl','setConversationPinned','delegate','locale','_historyView','removeConversation','510396vHuxrg','plugins','removeHistoryItem','addTab','updateHistoryItemsWithCategories','isPremiumPlugin','pluginName','updateItems','794284uHnUvO','hideError','setLoadingSkeleton','1pGaGia','updateItemTitle','openChat','9roOYVl','3636USgnyP'];_0x1762=function(){return _0x39cd83;};return _0x1762();}export class AIChatHistoryUI extends _0x1aaa8f{static get[_0x4a7367(0x1ed)](){return[_0x4743f8];}[_0x4a7367(0x20b)];static get[_0x4a7367(0x1e3)](){const _0x4c6f4e=_0x4a7367;return _0x4c6f4e(0x202);}static get[_0x4a7367(0x1f4)](){return!0x0;}static get[_0x4a7367(0x1e2)](){return!0x0;}constructor(_0x2ea803){const _0x38deb3=_0x4a7367;super(_0x2ea803);const _0x55df24=this[_0x38deb3(0x1f3)][_0x38deb3(0x1de)][_0x38deb3(0x204)](_0x38deb3(0x1fd));this[_0x38deb3(0x20b)]=new _0x3fca21(this[_0x38deb3(0x1f3)][_0x38deb3(0x20a)],_0x55df24[_0x38deb3(0x200)]),this[_0x38deb3(0x20b)][_0x38deb3(0x209)](...AI_CHAT_HISTORY_UI_EVENT_NAMES)['to'](this),_0x55df24[_0x38deb3(0x1fe)][_0x38deb3(0x1e0)]({'id':_0x38deb3(0x1ff),'buttonLabel':_0x4035fe(this[_0x38deb3(0x1f3)][_0x38deb3(0x20a)],_0x38deb3(0x206)),'buttonIcon':_0x346aa1,'order':0x0,'content':this[_0x38deb3(0x20b)]});}[_0x4a7367(0x1df)](_0x206352){const _0x57ed65=_0x4a7367;this[_0x57ed65(0x20b)][_0x57ed65(0x1df)](_0x206352);}[_0x4a7367(0x1e4)](_0x29bf0f){const _0x6fa93d=_0x4a7367;this[_0x6fa93d(0x20b)][_0x6fa93d(0x1e1)](_0x29bf0f);}[_0x4a7367(0x1e9)](_0x24c744,_0x122a36){const _0x13a6bb=_0x4a7367;this[_0x13a6bb(0x20b)][_0x13a6bb(0x1e9)](_0x24c744,_0x122a36);}[_0x4a7367(0x205)](_0x19685e,_0xf0415a,_0x18dfa9){const _0x3cdfb7=_0x4a7367;this[_0x3cdfb7(0x20b)][_0x3cdfb7(0x205)](_0x19685e,_0xf0415a,_0x18dfa9);}[_0x4a7367(0x1e7)](_0x207035){const _0x42f7e1=_0x4a7367;this[_0x42f7e1(0x20b)][_0x42f7e1(0x1f5)]=_0x207035;}[_0x4a7367(0x1fc)](_0x4c0480){const _0x1dbecb=_0x4a7367;this[_0x1dbecb(0x20b)][_0x1dbecb(0x1ee)]=_0x4c0480;}[_0x4a7367(0x1e6)](){const _0x11150e=_0x4a7367;this[_0x11150e(0x20b)][_0x11150e(0x1ee)]='';}[_0x4a7367(0x1f2)](_0x4f2349){const _0x5ca53e=_0x4a7367;this[_0x5ca53e(0x20b)][_0x5ca53e(0x1f7)]=_0x4f2349;}}