UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 4.64 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 _0x3c59c4=_0x5836;(function(_0x27e44f,_0x2d44f8){const _0x250dff=_0x5836,_0x7ebcd0=_0x27e44f();while(!![]){try{const _0x34e4d8=parseInt(_0x250dff(0xfe))/0x1*(-parseInt(_0x250dff(0x103))/0x2)+parseInt(_0x250dff(0xfd))/0x3+parseInt(_0x250dff(0xf1))/0x4*(-parseInt(_0x250dff(0x101))/0x5)+parseInt(_0x250dff(0x108))/0x6*(parseInt(_0x250dff(0xf0))/0x7)+-parseInt(_0x250dff(0xed))/0x8*(-parseInt(_0x250dff(0x10a))/0x9)+parseInt(_0x250dff(0x105))/0xa+parseInt(_0x250dff(0xfb))/0xb*(-parseInt(_0x250dff(0x107))/0xc);if(_0x34e4d8===_0x2d44f8)break;else _0x7ebcd0['push'](_0x7ebcd0['shift']());}catch(_0x31ccd5){_0x7ebcd0['push'](_0x7ebcd0['shift']());}}}(_0xfe34,0x48c13));import{Plugin as _0x4cb192}from'ckeditor5/src/core.js';function _0xfe34(){const _0x66225f=['7PKrvxD','4CUmDam','isOn','init','locale','menuBar:toggleAi','isOfficialPlugin','ck-ai-toggle-button','AIToggleButtonUI','get','AI_TOGGLE_BUTTON_LABEL','40359kzripd','commands','408201Sqrhuk','1uCwMBw','requires','componentFactory','769985KlHXaO','menuitemcheckbox','1188302cqlIMg','add','1703040jUPktb','_createAIUIButton','840cjcSJA','2722134hjDMNf','set','9gvnRxY','editor','bind','isPremiumPlugin','isEnabled','execute','toggleAi','pluginName','4343368CuxshI','listenTo','value'];_0xfe34=function(){return _0x66225f;};return _0xfe34();}import{ToggleAICommand as _0x5b28c1}from'./toggleaicommand.js';import{ButtonView as _0x33babf,MenuBarMenuListItemButtonView as _0x460f16}from'ckeditor5/src/ui.js';import{IconAIAskAI as _0x443c3b}from'@ckeditor/ckeditor5-icons';function _0x5836(_0x2ae9d0,_0x92f83f){const _0xfe344b=_0xfe34();return _0x5836=function(_0x5836c9,_0x1bb63f){_0x5836c9=_0x5836c9-0xeb;let _0x191063=_0xfe344b[_0x5836c9];return _0x191063;},_0x5836(_0x2ae9d0,_0x92f83f);}import{getTranslation as _0x1e4a48}from'../../aicore/utils/common-translations.js';import{AITabs as _0x43606e}from'../../aitabs/aitabs.js';import'../../../theme/aieditorintegration/aitogglebutton.css';export class AIToggleButtonUI extends _0x4cb192{static get[_0x3c59c4(0xff)](){return[_0x43606e];}static get[_0x3c59c4(0xec)](){const _0x18ca11=_0x3c59c4;return _0x18ca11(0xf8);}static get[_0x3c59c4(0xf6)](){return!0x0;}static get[_0x3c59c4(0x10d)](){return!0x0;}[_0x3c59c4(0xf3)](){const _0x372d4c=_0x3c59c4,_0x58d623=this[_0x372d4c(0x10b)];_0x58d623[_0x372d4c(0xfc)][_0x372d4c(0x104)](_0x372d4c(0xeb),new _0x5b28c1(_0x58d623)),_0x58d623['ui'][_0x372d4c(0x100)][_0x372d4c(0x104)](_0x372d4c(0xeb),()=>{const _0x350742=_0x372d4c,_0x59d8e7=this[_0x350742(0x106)](_0x33babf);return _0x59d8e7[_0x350742(0x109)]({'tooltip':!0x0,'class':_0x350742(0xf7)}),_0x59d8e7;}),_0x58d623['ui'][_0x372d4c(0x100)][_0x372d4c(0x104)](_0x372d4c(0xf5),()=>{const _0x1ebce6=_0x372d4c,_0x2dd4f2=this[_0x1ebce6(0x106)](_0x460f16);return _0x2dd4f2[_0x1ebce6(0x109)]({'role':_0x1ebce6(0x102)}),_0x2dd4f2;});}[_0x3c59c4(0x106)](_0x232453){const _0x5ea83c=_0x3c59c4,_0x31f935=this[_0x5ea83c(0x10b)],_0x122db0=_0x31f935[_0x5ea83c(0xfc)][_0x5ea83c(0xf9)](_0x5ea83c(0xeb)),_0x3afcc1=new _0x232453(_0x31f935[_0x5ea83c(0xf4)]);return _0x3afcc1[_0x5ea83c(0x109)]({'label':_0x1e4a48(_0x31f935[_0x5ea83c(0xf4)],_0x5ea83c(0xfa)),'icon':_0x443c3b,'isToggleable':!0x0}),_0x3afcc1[_0x5ea83c(0x10c)](_0x5ea83c(0x10e))['to'](_0x122db0),_0x3afcc1[_0x5ea83c(0x10c)](_0x5ea83c(0xf2))['to'](_0x122db0,_0x5ea83c(0xef),_0x3f58c3=>!!_0x3f58c3),this[_0x5ea83c(0xee)](_0x3afcc1,_0x5ea83c(0x10f),()=>{const _0x1821fb=_0x5ea83c;_0x122db0[_0x1821fb(0x10f)]();}),_0x3afcc1;}}