@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 4.73 kB
JavaScript
/*
* 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 _0x91f856=_0x34b3;(function(_0x33e004,_0x4728f1){const _0x18f1ff=_0x34b3,_0x3c5aa7=_0x33e004();while(!![]){try{const _0x155ab4=parseInt(_0x18f1ff(0xc4))/0x1+parseInt(_0x18f1ff(0xc8))/0x2+parseInt(_0x18f1ff(0xe1))/0x3*(-parseInt(_0x18f1ff(0xdd))/0x4)+parseInt(_0x18f1ff(0xd4))/0x5*(parseInt(_0x18f1ff(0xcf))/0x6)+-parseInt(_0x18f1ff(0xd3))/0x7*(parseInt(_0x18f1ff(0xdf))/0x8)+parseInt(_0x18f1ff(0xd0))/0x9*(parseInt(_0x18f1ff(0xed))/0xa)+parseInt(_0x18f1ff(0xc1))/0xb*(-parseInt(_0x18f1ff(0xde))/0xc);if(_0x155ab4===_0x4728f1)break;else _0x3c5aa7['push'](_0x3c5aa7['shift']());}catch(_0x3d5a66){_0x3c5aa7['push'](_0x3c5aa7['shift']());}}}(_0x33aa,0x49810));import{Command as _0x1d64bc}from'ckeditor5/src/core.js';import _0x5e5341 from'../aiassistantui.js';function _0x34b3(_0x5013fc,_0x258cbc){const _0x33aa8d=_0x33aa();return _0x34b3=function(_0x34b346,_0x51e211){_0x34b346=_0x34b346-0xc0;let _0x55d05f=_0x33aa8d[_0x34b346];return _0x55d05f;},_0x34b3(_0x5013fc,_0x258cbc);}export default class E extends _0x1d64bc{constructor(_0x40efaa,_0x5c8f29){const _0x3ac049=_0x34b3;super(_0x40efaa),this[_0x3ac049(0xe7)]=_0x5c8f29,this[_0x3ac049(0xc0)](_0x3ac049(0xca),[]),this['on'](_0x3ac049(0xc7),(_0x10a924,_0x1df151,_0x4ac66a)=>{const _0x3e64d5=_0x3ac049;this[_0x3e64d5(0xe3)]&&(this[_0x3e64d5(0xca)]=G(this[_0x3e64d5(0xe7)],_0x4ac66a));}),this[_0x3ac049(0xc0)](_0x3ac049(0xe9),!0x1),this['on'](_0x3ac049(0xd1),(_0x3b54a6,_0x498b9c,_0x53fa64)=>{const _0x31c02b=_0x3ac049;this[_0x31c02b(0xca)]=_0x53fa64?G(this[_0x31c02b(0xe7)],this[_0x31c02b(0xe9)]):[];});}[_0x91f856(0xe2)](){const _0x250966=_0x91f856,_0x423145=this[_0x250966(0xd6)][_0x250966(0xd8)];this[_0x250966(0xe9)]=function(_0x57cbd1){const _0x57d3c7=_0x250966,_0x4bc0f0=_0x57cbd1[_0x57d3c7(0xd2)][_0x57d3c7(0xe4)];return _0x4bc0f0[_0x57d3c7(0xe8)]?0x0!==[..._0x4bc0f0[_0x57d3c7(0xea)]()][_0x57d3c7(0xcd)]&&![..._0x4bc0f0[_0x57d3c7(0xea)]()][0x0][_0x57d3c7(0xd7)]:!!_0x57cbd1[_0x57d3c7(0xe0)](_0x4bc0f0[_0x57d3c7(0xda)]());}(_0x423145);const _0x3fbadb=_0x423145[_0x250966(0xd2)][_0x250966(0xe4)],_0x126e23=this[_0x250966(0xd6)][_0x250966(0xd9)][_0x250966(0xc3)](_0x250966(0xcc));for(const _0x1e7a1f of _0x3fbadb[_0x250966(0xc5)]())for(const _0x214207 of _0x1e7a1f[_0x250966(0xcb)]())if(_0x214207['is'](_0x250966(0xc2))&&_0x126e23[_0x250966(0xeb)](_0x214207[_0x250966(0xdb)]))return void(this[_0x250966(0xe3)]=!0x1);this[_0x250966(0xe3)]=!0x0;}[_0x91f856(0xc6)](_0x20da83='',_0x4c95f2='',_0x11c186=_0x91f856(0xe5)){const _0x27a2f3=_0x91f856;this[_0x27a2f3(0xd6)][_0x27a2f3(0xe6)][_0x27a2f3(0xc3)](_0x5e5341)[_0x27a2f3(0xce)](_0x20da83,_0x4c95f2,_0x11c186);}}function _0x33aa(){const _0x491751=['71528CrHGav','getRanges','execute','change:_hasContext','1013282wcatwU','add','enabledCommandsIds','getItems','ai.aiAssistant.disabledElements','length','showUI','1461588IXvuWE','81xWYjxv','change:isEnabled','document','7063fMhawS','5vpWggD','values','editor','isEmpty','model','config','getFirstRange','name','from','69024kZBpJh','12PoYFpn','1352qtfAHQ','hasContent','51xUvKqV','refresh','isEnabled','selection','custom','plugins','_commandDefinitions','isCollapsed','_hasContext','getSelectedBlocks','includes','requiresContent','436710viRhtT','set','4948471CJrXXU','element','get'];_0x33aa=function(){return _0x491751;};return _0x33aa();}function G(_0x1c98d2,_0x42580c){const _0x44eaf6=_0x91f856,_0x40b9d3=new Set();for(const _0x380c44 of _0x1c98d2[_0x44eaf6(0xd5)]())(_0x42580c||!0x1===_0x380c44[_0x44eaf6(0xec)])&&_0x40b9d3[_0x44eaf6(0xc9)](_0x380c44['id']);return Array[_0x44eaf6(0xdc)](_0x40b9d3);}