UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines • 21.4 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 _0x4b97ba=_0x4b20;(function(_0x17c269,_0x2bb78c){const _0x10d670=_0x4b20,_0x4260ce=_0x17c269();while(!![]){try{const _0x798630=-parseInt(_0x10d670(0x18b))/0x1+parseInt(_0x10d670(0x1fd))/0x2*(-parseInt(_0x10d670(0x1ee))/0x3)+parseInt(_0x10d670(0x1c5))/0x4*(parseInt(_0x10d670(0x1b8))/0x5)+-parseInt(_0x10d670(0x225))/0x6*(-parseInt(_0x10d670(0x201))/0x7)+parseInt(_0x10d670(0x1b5))/0x8+parseInt(_0x10d670(0x200))/0x9+parseInt(_0x10d670(0x19e))/0xa;if(_0x798630===_0x2bb78c)break;else _0x4260ce['push'](_0x4260ce['shift']());}catch(_0x285bd2){_0x4260ce['push'](_0x4260ce['shift']());}}}(_0x575f,0xa949d));import{Plugin as _0x442809}from'ckeditor5/src/core.js';import{IconMagicWand as _0x33d565,IconRobotPencil as _0x205a62}from'ckeditor5/src/icons.js';function _0x4b20(_0x1fa894,_0x5d6834){const _0x575f3=_0x575f();return _0x4b20=function(_0x4b20ea,_0x21958f){_0x4b20ea=_0x4b20ea-0x17e;let _0x15ec6b=_0x575f3[_0x4b20ea];return _0x15ec6b;},_0x4b20(_0x1fa894,_0x5d6834);}import{first as _0x2b13bf,CKEditorError as _0x246df4}from'ckeditor5/src/utils.js';import{createDropdown as _0x4d307a,addMenuToDropdown as _0x372374,ButtonView as _0x1d2136,MenuBarMenuListItemButtonView as _0x39e850,Dialog as _0x155bd,DialogViewPosition as _0x34ef35,MenuBarMenuView as _0x4c2601,MenuBarMenuListView as _0x53aa04,MenuBarMenuListItemView as _0x9cfcc1}from'ckeditor5/src/ui.js';import{normalizeCommandsConfig as _0x4b06b9,UNGROUPED_COMMANDS_GROUP_ID as _0x2c767b}from'./utils/normalizecommandsconfig.js';import{AIAssistantEditing as _0x4a5483}from'./aiassistantediting.js';import{AIAdapter as _0x5cf08e}from'./adapters/aiadapter.js';import{getTranslation as _0x249702}from'./utils/common-translations.js';import{ShowAIAssistantCommand as _0x578147}from'./ui/showaiassistantcommand.js';import{AIAssistantController as _0xb34b78}from'./ui/aiassistantcontroller.js';import{AIFormView as _0x571077}from'./ui/form/aiformview.js';import{AIFormToolbarViewMainActionLabel as _0xa8f898}from'./ui/form/aiformtoolbarview.js';import'../../theme/aiassistant/ai.css';import'../../theme/aiassistant/ai-dropdown.css';import'../../theme/aiassistant/ai-form.css';const _=globalThis[_0x4b97ba(0x220)];import{ClipboardMarkersUtils as _0x5cc1fe}from'ckeditor5/src/clipboard.js';import{ViewDocumentDomEventData as _0x2e376c,ViewDataTransfer as _0x16dbf5}from'ckeditor5/src/engine.js';export class AIAssistantUI extends _0x442809{[_0x4b97ba(0x194)];[_0x4b97ba(0x1c3)];[_0x4b97ba(0x218)];[_0x4b97ba(0x224)];[_0x4b97ba(0x19a)];[_0x4b97ba(0x1a8)];[_0x4b97ba(0x1d4)]='';static get[_0x4b97ba(0x1bb)](){const _0x18acbe=_0x4b97ba;return _0x18acbe(0x226);}static get[_0x4b97ba(0x228)](){return!0x0;}static get[_0x4b97ba(0x1c1)](){return!0x0;}static get[_0x4b97ba(0x1ad)](){return[_0x5cc1fe,_0x4a5483,_0x5cf08e,_0x155bd];}constructor(_0x152ce9){const _0x2bff9c=_0x4b97ba;super(_0x152ce9),_0x152ce9[_0x2bff9c(0x1c2)][_0x2bff9c(0x21c)](_0x2bff9c(0x1ec),[_0x2bff9c(0x1ba),_0x2bff9c(0x1c0),_0x2bff9c(0x204)]),_0x152ce9[_0x2bff9c(0x1c2)][_0x2bff9c(0x21c)](_0x2bff9c(0x1fb),''),_0x152ce9[_0x2bff9c(0x1c2)][_0x2bff9c(0x21c)](_0x2bff9c(0x215),!0x0),this[_0x2bff9c(0x1d4)]=_0x2bff9c(0x1b6)+(_0x152ce9[_0x2bff9c(0x1c2)][_0x2bff9c(0x205)](_0x2bff9c(0x215))?_0x2bff9c(0x19b):'');}[_0x4b97ba(0x1b3)](){const _0x3dfa3b=_0x4b97ba,{editor:_0x4fbd12}=this;this[_0x3dfa3b(0x19a)]=_0x4fbd12[_0x3dfa3b(0x1e5)][_0x3dfa3b(0x205)](_0x5cf08e),this[_0x3dfa3b(0x218)]=_0x4fbd12[_0x3dfa3b(0x1e5)][_0x3dfa3b(0x205)](_0x155bd),this[_0x3dfa3b(0x224)]=null,this[_0x3dfa3b(0x1bd)]=this[_0x3dfa3b(0x17f)]();const _0x5d5a21=new _0x578147(_0x4fbd12,Array[_0x3dfa3b(0x216)](this[_0x3dfa3b(0x1bd)][_0x3dfa3b(0x1be)]()));_0x4fbd12[_0x3dfa3b(0x1ce)][_0x3dfa3b(0x1fe)](_0x3dfa3b(0x1c7),_0x5d5a21),_0x4fbd12['ui'][_0x3dfa3b(0x22d)][_0x3dfa3b(0x1fe)](_0x3dfa3b(0x21b),_0x1bd65c=>{const _0x134012=_0x3dfa3b,_0xdf2d6e=_0x4d307a(_0x1bd65c);return _0xdf2d6e[_0x134012(0x210)]({'class':_0x134012(0x22b)+this[_0x134012(0x1d4)]}),_0xdf2d6e[_0x134012(0x1b0)][_0x134012(0x210)]({'label':_0x249702(_0x1bd65c,_0x134012(0x186)),'icon':_0x33d565,'tooltip':!0x0}),_0xdf2d6e['on'](_0x134012(0x1f1),_0x585bac=>this[_0x134012(0x1b9)](_0x585bac[_0x134012(0x214)]['id'])),_0x372374(_0xdf2d6e,_0x4fbd12['ui'][_0x134012(0x1a5)][_0x134012(0x1df)],function(_0x250406){const _0x49f9c8=_0x134012,_0x27231d=_0x4b06b9(_0x250406[_0x49f9c8(0x1c2)][_0x49f9c8(0x205)](_0x49f9c8(0x22c)),_0x250406[_0x49f9c8(0x1f0)]),_0x1435a5=z(_0x250406,_0x27231d)[_0x49f9c8(0x1a6)](_0x5597eb=>_0x5597eb[_0x49f9c8(0x1ce)][_0x49f9c8(0x207)]);if(0x1===_0x1435a5[_0x49f9c8(0x207)])return z(_0x250406,_0x1435a5[0x0][_0x49f9c8(0x1ce)])[_0x49f9c8(0x1cc)](_0x20f604=>({'id':_0x20f604['id'],'label':_0x20f604[_0x49f9c8(0x21d)]}));return _0x1435a5[_0x49f9c8(0x1cc)](_0x481b5c=>{const _0x325d69=_0x49f9c8,{groupId:_0x30fd88,groupLabel:_0x4012df,commands:_0x54edfa}=_0x481b5c,_0x75914=z(_0x250406,_0x54edfa)[_0x325d69(0x1cc)](_0x38f92d=>({'id':_0x38f92d['id'],'label':_0x38f92d[_0x325d69(0x21d)]}));return{'id':_0x30fd88,'menu':_0x4012df||_0x30fd88,'children':_0x75914};});}(_0x4fbd12),{'ariaLabel':_0x249702(_0x1bd65c,_0x134012(0x186))}),_0xdf2d6e[_0x134012(0x1d5)][_0x134012(0x222)]=_0x134012(0x22b)+this[_0x134012(0x1d4)],_0x5d5a21['on'](_0x134012(0x1f9),_0x6caaf8),_0xdf2d6e[_0x134012(0x1d5)][_0x134012(0x20b)](_0x134012(0x206),_0x6caaf8),_0xdf2d6e;function _0x6caaf8(){const _0x1579eb=_0x134012;_0xdf2d6e[_0x1579eb(0x1d8)]=_0x5d5a21[_0x1579eb(0x208)][_0x1579eb(0x207)]>0x0;for(const _0x5471f2 of _0xdf2d6e[_0x1579eb(0x1d5)][_0x1579eb(0x1a2)])_0x5471f2[_0x1579eb(0x1d8)]=_0x5d5a21[_0x1579eb(0x208)][_0x1579eb(0x1cd)](_0x5471f2['id']);}}),_0x4fbd12['ui'][_0x3dfa3b(0x22d)][_0x3dfa3b(0x1fe)](_0x3dfa3b(0x1a1),_0x56ab61=>{const _0x508caa=_0x3dfa3b,_0xa09f32=new _0x4c2601(_0x56ab61);_0xa09f32[_0x508caa(0x1b0)][_0x508caa(0x210)]({'label':_0x249702(_0x56ab61,_0x508caa(0x186)),'icon':_0x33d565}),_0xa09f32[_0x508caa(0x1b2)](_0x508caa(0x1d8))['to'](_0x5d5a21,_0x508caa(0x208),_0x5842ed=>_0x5842ed[_0x508caa(0x207)]>0x0);const _0x2a66df=_0x4b06b9(_0x4fbd12[_0x508caa(0x1c2)][_0x508caa(0x205)](_0x508caa(0x22c)),_0x56ab61);return this[_0x508caa(0x1ed)](_0x5d5a21,_0xa09f32,_0x2a66df,_0x308a03=>this[_0x508caa(0x1b9)](_0x308a03)),_0xa09f32;}),_0x4fbd12['ui'][_0x3dfa3b(0x22d)][_0x3dfa3b(0x1fe)](_0x3dfa3b(0x1f6),()=>{const _0x5d339b=_0x3dfa3b,_0x1db76b=this[_0x5d339b(0x1f7)](_0x1d2136);return _0x1db76b[_0x5d339b(0x210)]({'tooltip':!0x0,'class':_0x5d339b(0x185)+this[_0x5d339b(0x1d4)]}),_0x1db76b;}),_0x4fbd12['ui'][_0x3dfa3b(0x22d)][_0x3dfa3b(0x1fe)](_0x3dfa3b(0x1d1),()=>{const _0x4ec845=_0x3dfa3b,_0x5d8b22=this[_0x4ec845(0x1f7)](_0x39e850);return _0x5d8b22[_0x4ec845(0x210)]({'role':_0x4ec845(0x181)}),_0x5d8b22;}),this[_0x3dfa3b(0x194)]=this[_0x3dfa3b(0x1e1)][_0x3dfa3b(0x1c2)][_0x3dfa3b(0x205)](_0x3dfa3b(0x194));const _0x6d190=this[_0x3dfa3b(0x1e1)];this[_0x3dfa3b(0x1c3)]=setInterval(()=>{const _0x2d7987=_0x3dfa3b;let _0x3c4a19;for(const _0xd93e2e in _0x6d190){const _0x1631fc=_0xd93e2e,_0x58c154=_0x6d190[_0x1631fc];if(_0x2d7987(0x1bf)==_0x58c154||_0x2d7987(0x1f3)==_0x58c154||_0x2d7987(0x180)==_0x58c154||_0x2d7987(0x209)==_0x58c154||_0x2d7987(0x1d3)==_0x58c154||_0x2d7987(0x1f2)==_0x58c154||_0x2d7987(0x1dd)==_0x58c154||_0x2d7987(0x17e)==_0x58c154){delete _0x6d190[_0x1631fc],_0x3c4a19=_0x58c154,clearInterval(this[_0x2d7987(0x1c3)]),this[_0x2d7987(0x1c3)]=void 0x0;break;}}_0x2d7987(0x1f3)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x182)),_0x2d7987(0x180)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x19d)),_0x2d7987(0x209)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x1cb)),_0x2d7987(0x1d3)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x227),_0x2d7987(0x1e9)),_0x2d7987(0x1f2)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x1c4)),_0x2d7987(0x1dd)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x1b7)),_0x2d7987(0x17e)==_0x3c4a19&&_0x6d190[_0x2d7987(0x1ea)](_0x2d7987(0x1b4));},0x3e8);}[_0x4b97ba(0x21e)](){const _0x500c33=_0x4b97ba;super[_0x500c33(0x21e)](),this[_0x500c33(0x1c3)]&&clearInterval(this[_0x500c33(0x1c3)]);}[_0x4b97ba(0x190)](_0x1d36ed='',_0x520237='',_0x198550=_0x4b97ba(0x1ab)){const _0x497eb3=_0x4b97ba,_0x49b426=this[_0x497eb3(0x1e1)],_0x5e1db0=_0x49b426[_0x497eb3(0x1d0)][_0x497eb3(0x1a5)],_0x8b74c7=_0x49b426[_0x497eb3(0x1e5)][_0x497eb3(0x205)](_0x4a5483),_0x415af2=_0x49b426[_0x497eb3(0x1e5)][_0x497eb3(0x205)](_0x5cc1fe);_0x8b74c7[_0x497eb3(0x19c)]();const _0x520e76=new _(),_0x3d5965=new ClipboardEvent(_0x497eb3(0x20e),{'clipboardData':_0x520e76}),_0x3089f0=new _0x16dbf5(_0x520e76),_0x32d3f8=new _0x2e376c(_0x5e1db0,_0x3d5965,{'dataTransfer':_0x3089f0});_0x415af2[_0x497eb3(0x1f8)](_0x497eb3(0x221),()=>{const _0x365469=_0x497eb3;_0x5e1db0[_0x365469(0x1da)][_0x365469(0x189)](_0x365469(0x20e),_0x32d3f8);}),this[_0x497eb3(0x224)]||(this[_0x497eb3(0x18a)](),this[_0x497eb3(0x1a8)]=new _0xb34b78(_0x49b426,this[_0x497eb3(0x19a)][_0x497eb3(0x192)],this[_0x497eb3(0x224)]));let _0x4dfa44=_0x3089f0[_0x497eb3(0x198)](_0x497eb3(0x1eb));const _0x55a9c4=_0x49b426[_0x497eb3(0x1f5)][_0x497eb3(0x1da)][_0x497eb3(0x22a)],_0x2984d5=Array[_0x497eb3(0x216)](_0x55a9c4[_0x497eb3(0x193)]());0x1===_0x2984d5[_0x497eb3(0x207)]&&_0x2984d5[0x0][_0x497eb3(0x1db)]&&!_0x55a9c4[_0x497eb3(0x187)]()&&''!==_0x4dfa44[_0x497eb3(0x1a4)](/&nbsp;/g,'')[_0x497eb3(0x1dc)]()&&(_0x4dfa44=_0x497eb3(0x1ac)+_0x4dfa44+_0x497eb3(0x1bc)),this[_0x497eb3(0x1a8)][_0x497eb3(0x1cf)]({'actionId':_0x198550,'query':_0x1d36ed,'htmlContent':_0x4dfa44,'label':_0x520237,'mainActionLabel':_0xa8f898[_0x49b426[_0x497eb3(0x1f5)][_0x497eb3(0x1da)][_0x497eb3(0x22a)][_0x497eb3(0x223)]?_0x497eb3(0x1ff):_0x497eb3(0x1e2)]}),_0x497eb3(0x1f6)!==this[_0x497eb3(0x218)]['id']?this[_0x497eb3(0x218)][_0x497eb3(0x20d)]({'id':_0x497eb3(0x1f6),'icon':_0x205a62,'title':_0x249702(this[_0x497eb3(0x1e1)][_0x497eb3(0x1f0)],_0x497eb3(0x19f)),'content':this[_0x497eb3(0x224)],'position':_0x34ef35[_0x497eb3(0x1d7)],'onShow':()=>{const _0x322c22=_0x497eb3;this[_0x322c22(0x224)][_0x322c22(0x1fc)]();},'onHide':()=>{const _0x22588a=_0x497eb3;this[_0x22588a(0x1a8)][_0x22588a(0x1ca)](),_0x8b74c7[_0x22588a(0x1e7)]();}}):this[_0x497eb3(0x218)][_0x497eb3(0x1a5)][_0x497eb3(0x21a)]||this[_0x497eb3(0x218)][_0x497eb3(0x1a5)][_0x497eb3(0x1e4)]();}[_0x4b97ba(0x195)](){const _0x44fd07=_0x4b97ba;this[_0x44fd07(0x218)][_0x44fd07(0x1de)]();}[_0x4b97ba(0x17f)](){const _0x596169=_0x4b97ba,_0x4913b9=new Map(),_0x15d832=_0x4b06b9(this[_0x596169(0x1e1)][_0x596169(0x1c2)][_0x596169(0x205)](_0x596169(0x22c)),this[_0x596169(0x1e1)][_0x596169(0x1f0)]);for(const _0x53c63a of _0x15d832)for(const _0x46fc2f of _0x53c63a[_0x596169(0x1ce)])_0x4913b9[_0x596169(0x210)](_0x46fc2f['id'],{..._0x46fc2f,'groupId':_0x53c63a[_0x596169(0x1ae)],'groupLabel':_0x53c63a[_0x596169(0x197)]||_0x53c63a[_0x596169(0x1ae)]});return _0x4913b9;}[_0x4b97ba(0x1f7)](_0x2ed368){const _0x52dd74=_0x4b97ba,_0x4a0934=this[_0x52dd74(0x1e1)],_0x52d9fa=_0x4a0934[_0x52dd74(0x1ce)][_0x52dd74(0x205)](_0x52dd74(0x1c7)),_0x134ee3=new _0x2ed368(_0x4a0934[_0x52dd74(0x1f0)]);return _0x134ee3[_0x52dd74(0x210)]({'label':_0x249702(_0x4a0934[_0x52dd74(0x1f0)],_0x52dd74(0x19f)),'icon':_0x205a62,'isToggleable':!0x0}),_0x134ee3[_0x52dd74(0x1b2)](_0x52dd74(0x1d8))['to'](_0x52d9fa),_0x134ee3[_0x52dd74(0x1b2)](_0x52dd74(0x18d))['to'](this[_0x52dd74(0x218)],'id',_0x1592ba=>_0x52dd74(0x1f6)===_0x1592ba),this[_0x52dd74(0x188)](_0x134ee3,_0x52dd74(0x1f1),()=>{const _0x1f201b=_0x52dd74;_0x134ee3[_0x1f201b(0x18d)]?this[_0x1f201b(0x195)]():_0x52d9fa[_0x1f201b(0x1f1)]();}),_0x134ee3;}[_0x4b97ba(0x18a)](){const _0x20872e=_0x4b97ba,_0x40e450=this[_0x20872e(0x1e1)][_0x20872e(0x1e5)][_0x20872e(0x205)](_0x4a5483);this[_0x20872e(0x224)]=new _0x571077(this[_0x20872e(0x1e1)][_0x20872e(0x1f0)],this[_0x20872e(0x1d4)],this[_0x20872e(0x1e1)][_0x20872e(0x1c2)][_0x20872e(0x205)](_0x20872e(0x1fb))),this[_0x20872e(0x224)]['on'](_0x20872e(0x1fa),()=>{const _0x5c08a6=_0x20872e;this[_0x5c08a6(0x218)][_0x5c08a6(0x1a5)][_0x5c08a6(0x21a)]||this[_0x5c08a6(0x218)][_0x5c08a6(0x1a5)][_0x5c08a6(0x1e4)]();}),this[_0x20872e(0x224)][_0x20872e(0x199)][_0x20872e(0x1aa)][_0x20872e(0x1f4)]['on'](_0x20872e(0x212),()=>{const _0x211500=_0x20872e;this[_0x211500(0x218)][_0x211500(0x1a5)][_0x211500(0x21a)]||this[_0x211500(0x218)][_0x211500(0x1a5)][_0x211500(0x1e4)]();}),this[_0x20872e(0x188)](this[_0x20872e(0x224)],_0x20872e(0x203),()=>{const _0xcdd04d=_0x20872e;_0x40e450[_0xcdd04d(0x229)](this[_0xcdd04d(0x1a8)][_0xcdd04d(0x20c)]),this[_0xcdd04d(0x195)]();}),this[_0x20872e(0x188)](this[_0x20872e(0x224)],_0x20872e(0x1e0),()=>{const _0x3d2d9a=_0x20872e;_0x40e450[_0x3d2d9a(0x1e0)](this[_0x3d2d9a(0x1a8)][_0x3d2d9a(0x20c)]),this[_0x3d2d9a(0x195)]();}),this[_0x20872e(0x1ef)]();}[_0x4b97ba(0x1ef)](){const _0x151679=_0x4b97ba,{locale:_0x257ead,ui:{ariaLiveAnnouncer:_0x465a41}}=this[_0x151679(0x1e1)];this[_0x151679(0x224)][_0x151679(0x1b1)]['on'](_0x151679(0x1af),(_0x1e07d2,_0x395874,_0x38742d)=>{const _0x2891f7=_0x151679,_0x10c434=this[_0x2891f7(0x1a8)][_0x2891f7(0x20c)];_0x38742d?_0x465a41[_0x2891f7(0x1c9)](_0x249702(_0x257ead,_0x2891f7(0x1d2))):_0x10c434&&_0x465a41[_0x2891f7(0x1c9)](_0x249702(_0x257ead,_0x2891f7(0x213),_0x10c434),{'politeness':_0x2891f7(0x202),'isUnsafeHTML':!0x0});}),this[_0x151679(0x224)]['on'](_0x151679(0x211),(_0x374110,_0x281b73,_0x54bdf9)=>{const _0x10d039=_0x151679;if(_0x54bdf9){const _0x53462b=this[_0x10d039(0x224)][_0x10d039(0x1d9)][_0x10d039(0x183)];_0x465a41[_0x10d039(0x1c9)](_0x249702(_0x257ead,_0x10d039(0x1a9),_0x53462b));}});}[_0x4b97ba(0x1b9)](_0x335636){const _0x4600f9=_0x4b97ba,_0x33e9eb=this[_0x4600f9(0x1bd)][_0x4600f9(0x205)](_0x335636),_0x13ba59=this[_0x4600f9(0x1e1)],_0x2a9ef3=_0x13ba59[_0x4600f9(0x1f5)][_0x4600f9(0x1da)][_0x4600f9(0x22a)],_0x139fe5=_0x13ba59[_0x4600f9(0x1ce)][_0x4600f9(0x205)](_0x4600f9(0x1c7)),_0x418064=_0x13ba59[_0x4600f9(0x1e5)][_0x4600f9(0x205)](_0x4a5483),_0x5da8bb=''+(_0x33e9eb[_0x4600f9(0x1ae)]!==_0x2c767b?_0x33e9eb[_0x4600f9(0x197)]+':\x20':'')+_0x33e9eb[_0x4600f9(0x21d)];if(!0x1!==_0x33e9eb[_0x4600f9(0x20a)]&&_0x2a9ef3[_0x4600f9(0x223)]){const _0x619026=_0x2b13bf(_0x2a9ef3[_0x4600f9(0x1e3)]())||_0x13ba59[_0x4600f9(0x1f5)][_0x4600f9(0x217)][_0x4600f9(0x21f)](_0x2a9ef3);_0x13ba59[_0x4600f9(0x1f5)][_0x4600f9(0x1c8)](_0x35f95a=>{const _0x1d2516=_0x4600f9;_0x35f95a[_0x1d2516(0x20f)](_0x619026,'in');});}_0x418064[_0x4600f9(0x19c)](),_0x139fe5[_0x4600f9(0x1f1)](_0x33e9eb[_0x4600f9(0x1e8)],_0x5da8bb,_0x4600f9(0x1d6)+_0x335636);}[_0x4b97ba(0x1ed)](_0x1d5c07,_0x55865c,_0xe169e,_0x19856f){const _0x4c8c06=_0x4b97ba,_0x1754b3=this[_0x4c8c06(0x1e1)],_0x273863=_0x1754b3[_0x4c8c06(0x1f0)],_0x3040af=new _0x53aa04(_0x273863),_0x26633b=z(_0x1754b3,_0xe169e)[_0x4c8c06(0x1a6)](_0x5244c3=>_0x5244c3[_0x4c8c06(0x1ce)][_0x4c8c06(0x207)]);0x1===_0x26633b[_0x4c8c06(0x207)]?this[_0x4c8c06(0x1e6)]({'command':_0x1d5c07,'commands':_0x26633b[0x0][_0x4c8c06(0x1ce)],'parentMenuView':_0x55865c,'onExecute':_0x19856f})[_0x4c8c06(0x1a0)](_0x22f398=>_0x3040af[_0x4c8c06(0x1a3)][_0x4c8c06(0x1fe)](_0x22f398)):_0x26633b[_0x4c8c06(0x1a0)](({groupId:_0x299f66,groupLabel:_0x151bce,commands:_0x2a43f7})=>{const _0x5722c5=_0x4c8c06,_0x110fd5=new _0x9cfcc1(_0x273863,_0x55865c),_0x175480=new _0x4c2601(_0x273863),_0x164341=new _0x53aa04(_0x273863),_0x41cf25=this[_0x5722c5(0x1e6)]({'command':_0x1d5c07,'commands':_0x2a43f7,'parentMenuView':_0x175480,'onExecute':_0x19856f});_0x175480[_0x5722c5(0x1b0)][_0x5722c5(0x210)]({'label':_0x151bce||_0x299f66}),_0x175480[_0x5722c5(0x219)](_0x5722c5(0x1f1))['to'](_0x55865c),_0x164341[_0x5722c5(0x1a3)][_0x5722c5(0x184)](_0x41cf25),_0x175480[_0x5722c5(0x18e)][_0x5722c5(0x1a7)][_0x5722c5(0x1fe)](_0x164341),_0x110fd5[_0x5722c5(0x1a7)][_0x5722c5(0x1fe)](_0x175480),_0x3040af[_0x5722c5(0x1a3)][_0x5722c5(0x1fe)](_0x110fd5);}),_0x55865c[_0x4c8c06(0x18e)][_0x4c8c06(0x1a7)][_0x4c8c06(0x1fe)](_0x3040af);}[_0x4b97ba(0x1e6)]({command:_0x19f607,commands:_0x5d9fac,parentMenuView:_0x435c4a,onExecute:_0x4f759c}){const _0x266e91=_0x4b97ba,_0x20cd1e=this[_0x266e91(0x1e1)],_0x1790d2=_0x20cd1e[_0x266e91(0x1f0)];return z(_0x20cd1e,_0x5d9fac)[_0x266e91(0x1cc)](_0x5c0387=>{const _0x96cfef=_0x266e91,_0x4d86c=new _0x9cfcc1(_0x1790d2,_0x435c4a),_0x4f581c=new _0x39e850(_0x1790d2);return _0x4f581c[_0x96cfef(0x210)]({'label':_0x5c0387[_0x96cfef(0x21d)]}),_0x4f581c[_0x96cfef(0x219)](_0x96cfef(0x1f1))['to'](_0x435c4a),_0x4f581c['on'](_0x96cfef(0x1f1),()=>_0x4f759c(_0x5c0387['id'])),_0x4f581c[_0x96cfef(0x1b2)](_0x96cfef(0x1d8))['to'](_0x19f607,_0x96cfef(0x208),_0x7b6f9e=>_0x7b6f9e[_0x96cfef(0x1cd)](_0x5c0387['id'])),_0x4d86c[_0x96cfef(0x1a7)][_0x96cfef(0x1fe)](_0x4f581c),_0x4d86c;});}}function S(_0x5e93cb,_0xd114ec){const _0x419d09=_0x4b97ba;return void 0x0!==_0x5e93cb[_0x419d09(0x1c6)]&&void 0x0===_0xd114ec[_0x419d09(0x1c6)]?0x1:void 0x0===_0x5e93cb[_0x419d09(0x1c6)]&&void 0x0!==_0xd114ec[_0x419d09(0x1c6)]?-0x1:void 0x0!==_0x5e93cb[_0x419d09(0x1c6)]&&void 0x0!==_0xd114ec[_0x419d09(0x1c6)]?_0x5e93cb[_0x419d09(0x1c6)]-_0xd114ec[_0x419d09(0x1c6)]:0x0;}function _0x575f(){const _0x16b540=['_licenseKeyCheckInterval','evaluationLimit','488cAMrud','order','showAIAssistant','change','announce','reset','domainLimit','map','includes','commands','updateView','editing','menuBar:aiAssistant','AI\x20is\x20writing','aiLicenseKeyNotAllowed','_uiCssClasses','menuView','command:','EDITOR_TOP_SIDE','isEnabled','errorView','document','isFlat','trim','aiLicenseKeyTrialLimit','hide','body','insertContentBelow','editor','REPLACE','getSelectedBlocks','updatePosition','plugins','_getMenuBarGroupButtons','hideFakeVisualSelection','prompt','AIAssistant','_showLicenseError','text/html','ai.assistant.disabledElements','_populateMenuBarMenu','55167OxXtsl','_initAriaAiStatusChangeAnnouncements','locale','execute','aiLicenseKeyEvaluationLimit','aiLicenseKeyInvalid','fieldView','model','aiAssistant','_createAIAssistantUIButton','_forceMarkersCopy','change:enabledCommandsIds','change:value','ai.assistant.contentAreaCssClass','focus','84RViYIm','add','INSERT','9602910ZvFnla','56GWYSzD','polite','replaceContent','tableOfContents','get','render','length','enabledCommandsIds','aiLicenseKeyDomainLimit','requiresContent','once','currentContext','show','copy','setSelection','set','change:isError','update','Generated\x20content:\x20%0','source','ai.assistant.useTheme','from','schema','_dialog','delegate','wasMoved','aiCommands','define','label','destroy','getLimitElement','DataTransfer','comment','menuPanelClass','isCollapsed','_formView','149658rcSSON','AIAssistantUI','featureNotAllowed','isOfficialPlugin','insertContent','selection','ck-ai-commands-dropdown\x20','ai.assistant.commands','componentFactory','aiLicenseKeyUsageLimit','_getResolvedCommandsDefinitions','aiLicenseKeyExpired','menuitemcheckbox','invalid','text','addMany','ck-ai-assistant-button\x20','AI\x20Commands','getSelectedElement','listenTo','fire','_initView','1129576FfFeun','splice','isOn','panelView','push','showUI','sort','textAdapter','getRanges','licenseKey','hideUI','ai-commands-config-order-collision','groupLabel','getData','promptView','_aiAdapter','\x20ck-ai-assistant-ui_theme','showFakeVisualSelection','expired','7176960bpThEL','AI\x20Assistant','forEach','menuBar:aiCommands','buttons','items','replace','view','filter','children','_aiAssistantController','Error\x20during\x20AI\x20content\x20generation:\x20%0','queryView','custom','<p>','requires','groupId','change:isProcessing','buttonView','contentArea','bind','init','usageLimit','1955832MgBfRo','ck-ai-assistant-ui','trialLimit','15025aYYGCM','_onExecute','media','pluginName','</p>','_commandDefinitions','values','aiLicenseKeyValid','rawHtml','isPremiumPlugin','config'];_0x575f=function(){return _0x16b540;};return _0x575f();}function z(_0x28dc46,_0x27251e){const _0xe381fa=_0x4b97ba;_0x27251e[_0xe381fa(0x191)](S);const _0x525661={},_0x389547=[];for(const _0x56bf2c of _0x27251e)if(void 0x0!==_0x56bf2c[_0xe381fa(0x1c6)]){if(_0x56bf2c[_0xe381fa(0x1c6)]in _0x525661)throw new _0x246df4(_0xe381fa(0x196),_0x28dc46,{'conflictingDefinitions':[_0x56bf2c,_0x525661[_0x56bf2c[_0xe381fa(0x1c6)]]]});_0x525661[_0x56bf2c[_0xe381fa(0x1c6)]]=_0x56bf2c,_0x389547[_0xe381fa(0x18c)](_0x56bf2c[_0xe381fa(0x1c6)],0x0,_0x56bf2c);}else _0x389547[_0xe381fa(0x18f)](_0x56bf2c);return _0x389547;}