UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 4.7 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0x4a5b(_0x4a3bf6,_0x39df33){const _0x14e7b6=_0x14e7();return _0x4a5b=function(_0x4a5bc7,_0x25efd5){_0x4a5bc7=_0x4a5bc7-0xc7;let _0x458d86=_0x14e7b6[_0x4a5bc7];return _0x458d86;},_0x4a5b(_0x4a3bf6,_0x39df33);}const _0x336815=_0x4a5b;(function(_0x2d43c5,_0x20be59){const _0x2bc0b6=_0x4a5b,_0x4296ca=_0x2d43c5();while(!![]){try{const _0xca7b08=-parseInt(_0x2bc0b6(0xed))/0x1+parseInt(_0x2bc0b6(0xd4))/0x2+parseInt(_0x2bc0b6(0xeb))/0x3*(parseInt(_0x2bc0b6(0xec))/0x4)+parseInt(_0x2bc0b6(0xdf))/0x5+parseInt(_0x2bc0b6(0xd6))/0x6+-parseInt(_0x2bc0b6(0xda))/0x7*(-parseInt(_0x2bc0b6(0xf1))/0x8)+parseInt(_0x2bc0b6(0xd8))/0x9*(-parseInt(_0x2bc0b6(0xe7))/0xa);if(_0xca7b08===_0x20be59)break;else _0x4296ca['push'](_0x4296ca['shift']());}catch(_0x328826){_0x4296ca['push'](_0x4296ca['shift']());}}}(_0x14e7,0xa94a5));import{Command as _0x1a00d}from'ckeditor5/src/core.js';import{AIAssistantUI as _0x589c3f}from'../aiassistantui.js';export class ShowAIAssistantCommand extends _0x1a00d{[_0x336815(0xe4)];constructor(_0x13e686,_0x170caa){const _0x26d47d=_0x336815;super(_0x13e686),this[_0x26d47d(0xe4)]=_0x170caa,this[_0x26d47d(0xd1)](_0x26d47d(0xd5),[]),this['on'](_0x26d47d(0xf0),(_0x3fe034,_0x29b7b2,_0x527abe)=>{const _0x540fb8=_0x26d47d;this[_0x540fb8(0xce)]&&(this[_0x540fb8(0xd5)]=fs(this[_0x540fb8(0xe4)],_0x527abe));}),this[_0x26d47d(0xd1)](_0x26d47d(0xd3),!0x1),this['on'](_0x26d47d(0xe2),(_0x459799,_0x105159,_0x5650c8)=>{const _0x350915=_0x26d47d;this[_0x350915(0xd5)]=_0x5650c8?fs(this[_0x350915(0xe4)],this[_0x350915(0xd3)]):[];});}[_0x336815(0xd9)](){const _0xfab26a=_0x336815,_0x43beaf=this[_0xfab26a(0xdd)][_0xfab26a(0xdb)];this[_0xfab26a(0xd3)]=function(_0x31a63e){const _0x21fe9b=_0xfab26a,_0x1c8402=_0x31a63e[_0x21fe9b(0xcd)][_0x21fe9b(0xd7)];return _0x1c8402[_0x21fe9b(0xe1)]?0x0!==[..._0x1c8402[_0x21fe9b(0xf2)]()][_0x21fe9b(0xe9)]&&![..._0x1c8402[_0x21fe9b(0xf2)]()][0x0][_0x21fe9b(0xe5)]:!!_0x31a63e[_0x21fe9b(0xe3)](_0x1c8402[_0x21fe9b(0xe6)]());}(_0x43beaf);const _0x1bd26f=_0x43beaf[_0xfab26a(0xcd)][_0xfab26a(0xd7)],_0x205847=this[_0xfab26a(0xdd)][_0xfab26a(0xd0)][_0xfab26a(0xe8)](_0xfab26a(0xcb));for(const _0x423b99 of _0x1bd26f[_0xfab26a(0xca)]())for(const _0x4ff920 of _0x423b99[_0xfab26a(0xef)]())if(_0x4ff920['is'](_0xfab26a(0xe0))&&_0x205847[_0xfab26a(0xee)](_0x4ff920[_0xfab26a(0xcc)]))return void(this[_0xfab26a(0xce)]=!0x1);this[_0xfab26a(0xce)]=!0x0;}[_0x336815(0xc9)](_0x2b11ae='',_0x360749='',_0x644904=_0x336815(0xc7)){const _0x3d5fd4=_0x336815;this[_0x3d5fd4(0xdd)][_0x3d5fd4(0xcf)][_0x3d5fd4(0xe8)](_0x589c3f)[_0x3d5fd4(0xdc)](_0x2b11ae,_0x360749,_0x644904);}}function fs(_0x4432b4,_0x167db0){const _0x8a3183=_0x336815,_0x2ba2ca=new Set();for(const _0x2bea81 of _0x4432b4[_0x8a3183(0xea)]())(_0x167db0||!0x1===_0x2bea81[_0x8a3183(0xd2)])&&_0x2ba2ca[_0x8a3183(0xc8)](_0x2bea81['id']);return Array[_0x8a3183(0xde)](_0x2ba2ca);}function _0x14e7(){const _0xc4e82b=['_hasContext','169484nMyegA','enabledCommandsIds','1999674AmNFKw','selection','4973571xWLTHj','refresh','7574MYtPjO','model','showUI','editor','from','4474070LAGADi','element','isCollapsed','change:isEnabled','hasContent','_commandDefinitions','isEmpty','getFirstRange','10CijeVX','get','length','values','524751mFltSx','8VBDgHk','742319EkmkWA','includes','getItems','change:_hasContext','2408PUNIMd','getSelectedBlocks','custom','add','execute','getRanges','ai.assistant.disabledElements','name','document','isEnabled','plugins','config','set','requiresContent'];_0x14e7=function(){return _0xc4e82b;};return _0x14e7();}