@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 7.13 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x2057(_0x2216b9,_0xc885e9){const _0x5043c5=_0x5043();return _0x2057=function(_0x205731,_0x203374){_0x205731=_0x205731-0x116;let _0x5e23d2=_0x5043c5[_0x205731];return _0x5e23d2;},_0x2057(_0x2216b9,_0xc885e9);}const _0x3f869d=_0x2057;(function(_0x178ded,_0x11b98d){const _0x20cbc5=_0x2057,_0x1e03e5=_0x178ded();while(!![]){try{const _0x575d1c=-parseInt(_0x20cbc5(0x122))/0x1*(-parseInt(_0x20cbc5(0x120))/0x2)+-parseInt(_0x20cbc5(0x145))/0x3*(-parseInt(_0x20cbc5(0x138))/0x4)+parseInt(_0x20cbc5(0x11c))/0x5*(parseInt(_0x20cbc5(0x137))/0x6)+parseInt(_0x20cbc5(0x11b))/0x7*(-parseInt(_0x20cbc5(0x12d))/0x8)+parseInt(_0x20cbc5(0x141))/0x9+parseInt(_0x20cbc5(0x13c))/0xa+-parseInt(_0x20cbc5(0x135))/0xb;if(_0x575d1c===_0x11b98d)break;else _0x1e03e5['push'](_0x1e03e5['shift']());}catch(_0x4a2839){_0x1e03e5['push'](_0x1e03e5['shift']());}}}(_0x5043,0x39105));import{ButtonView as _0x167dc5,IconView as _0x2b02ec,ToolbarView as _0x550c86}from'ckeditor5/src/ui.js';import{IconCheck as _0xab30b2,IconCopy as _0x330b67,IconShowChangesOff as _0x5a8945,IconShowChangesOn as _0xa05531,IconThumbDown as _0x5329de,IconThumbUp as _0x4418b2}from'@ckeditor/ckeditor5-icons';function _0x5043(){const _0x527483=['1965010lTOARx','ck-ai-mini-toolbar-copy-button\x20ck-ai-mini-toolbar-copy-button_copied','showCopy','_setupRatingButtons','isOn','4159917ecZjjJ','dislikeButton','isEnabled','fire','48ldozAu','extendTemplate','showLike','toggleShowChanges','showDislike','ck-ai-mini-toolbar-copy-button__check-mark','_config','_setupCopyButton','add','like','66661cFPTaA','9995DtuKGO','full','items','customView','40GqGiJr','AI_MINI_TOOLBAR_COPY','16034ONOKZz','_setupShowChangesButton','length','showChanges','AI_MINI_TOOLBAR_LIKE','addMany','ck-ai-mini-toolbar-copy-button','ck-ai-mini-toolbar\x20ck-hidden','copyButton','dislike','ck-ai-mini-toolbar','16VmTCeK','children','locale','isLoading','bind','execute','showChangesButton','AI_MINI_TOOLBAR_DISLIKE','14347520oggftl','set','1002koLkdG','60968bvLdSP','likeButton','class','AI_SUGGESTION_BUTTON_SHOW_CHANGES'];_0x5043=function(){return _0x527483;};return _0x5043();}import{getTranslation as _0x114ffb}from'../../utils/common-translations.js';export class AIMiniToolbarView extends _0x550c86{[_0x3f869d(0x12a)];[_0x3f869d(0x139)];[_0x3f869d(0x142)];[_0x3f869d(0x133)];[_0x3f869d(0x117)];constructor(_0x50367f,_0x58f8f8={},_0x99f4b5){const _0xf28a=_0x3f869d;super(_0x50367f),this[_0xf28a(0x136)](_0xf28a(0x130),!0x1),this[_0xf28a(0x117)]={'showCopy':!0x1,'showLike':!0x1,'showDislike':!0x1,..._0x58f8f8};const _0x2a64ca=!(this[_0xf28a(0x117)][_0xf28a(0x13e)]||this[_0xf28a(0x117)][_0xf28a(0x125)]||this[_0xf28a(0x117)][_0xf28a(0x147)]||this[_0xf28a(0x117)][_0xf28a(0x149)]||this[_0xf28a(0x117)][_0xf28a(0x11f)]?.[_0xf28a(0x124)]);this[_0xf28a(0x13a)]=_0x2a64ca?_0xf28a(0x129):_0xf28a(0x12c),this[_0xf28a(0x117)][_0xf28a(0x13e)]&&(this[_0xf28a(0x118)](),this[_0xf28a(0x11e)][_0xf28a(0x119)](this[_0xf28a(0x12a)])),this[_0xf28a(0x117)][_0xf28a(0x125)]&&(this[_0xf28a(0x123)](_0x99f4b5),this[_0xf28a(0x11e)][_0xf28a(0x119)](this[_0xf28a(0x133)])),this[_0xf28a(0x13f)](),this[_0xf28a(0x117)][_0xf28a(0x147)]&&this[_0xf28a(0x11e)][_0xf28a(0x119)](this[_0xf28a(0x139)]),this[_0xf28a(0x117)][_0xf28a(0x149)]&&this[_0xf28a(0x11e)][_0xf28a(0x119)](this[_0xf28a(0x142)]),this[_0xf28a(0x117)][_0xf28a(0x11f)]&&this[_0xf28a(0x11e)][_0xf28a(0x127)](this[_0xf28a(0x117)][_0xf28a(0x11f)]);}[_0x3f869d(0x13f)](){const _0x441372=_0x3f869d;this[_0x441372(0x139)]=new _0x167dc5(this[_0x441372(0x12f)]),this[_0x441372(0x139)][_0x441372(0x136)]({'icon':_0x4418b2,'label':_0x114ffb(this[_0x441372(0x12f)],_0x441372(0x126)),'tooltip':!0x0}),this[_0x441372(0x139)][_0x441372(0x131)](_0x441372(0x143))['to'](this,_0x441372(0x130),_0x114edd=>!_0x114edd),this[_0x441372(0x139)]['on'](_0x441372(0x132),()=>{const _0x217ca3=_0x441372;this[_0x217ca3(0x144)](_0x217ca3(0x11a));}),this[_0x441372(0x142)]=new _0x167dc5(this[_0x441372(0x12f)]),this[_0x441372(0x142)][_0x441372(0x136)]({'icon':_0x5329de,'label':_0x114ffb(this[_0x441372(0x12f)],_0x441372(0x134)),'tooltip':!0x0}),this[_0x441372(0x142)][_0x441372(0x131)](_0x441372(0x143))['to'](this,_0x441372(0x130),_0x2f1f41=>!_0x2f1f41),this[_0x441372(0x142)]['on'](_0x441372(0x132),()=>{const _0x3ef829=_0x441372;this[_0x3ef829(0x144)](_0x3ef829(0x12b));});}[_0x3f869d(0x118)](){const _0x531c40=_0x3f869d;this[_0x531c40(0x12a)]=new _0x167dc5(this[_0x531c40(0x12f)]),this[_0x531c40(0x12a)][_0x531c40(0x136)]({'icon':_0x330b67,'label':_0x114ffb(this[_0x531c40(0x12f)],_0x531c40(0x121)),'class':_0x531c40(0x128),'tooltip':!0x0}),this[_0x531c40(0x12a)][_0x531c40(0x131)](_0x531c40(0x143))['to'](this,_0x531c40(0x130),_0x26c882=>!_0x26c882);const _0x3c6f64=new _0x2b02ec();_0x3c6f64[_0x531c40(0x136)]({'content':_0xab30b2}),_0x3c6f64[_0x531c40(0x146)]({'attributes':{'class':[_0x531c40(0x116)]}}),this[_0x531c40(0x12a)]['on'](_0x531c40(0x132),()=>{const _0x108783=_0x531c40;this[_0x108783(0x12a)][_0x108783(0x13a)]=_0x108783(0x13d),setTimeout(()=>{const _0x46eb17=_0x108783;this[_0x46eb17(0x12a)][_0x46eb17(0x13a)]=_0x46eb17(0x128);},0x7d0);}),this[_0x531c40(0x12a)][_0x531c40(0x12e)][_0x531c40(0x119)](_0x3c6f64);}[_0x3f869d(0x123)](_0x17060d){const _0x4b12f0=_0x3f869d;this[_0x4b12f0(0x133)]=new _0x167dc5(this[_0x4b12f0(0x12f)]),this[_0x4b12f0(0x133)][_0x4b12f0(0x136)]({'icon':_0x5a8945,'label':_0x114ffb(this[_0x4b12f0(0x12f)],_0x4b12f0(0x13b)),'withText':_0x4b12f0(0x11d)==this[_0x4b12f0(0x117)][_0x4b12f0(0x125)],'tooltip':_0x4b12f0(0x11d)!=this[_0x4b12f0(0x117)][_0x4b12f0(0x125)],'isOn':_0x17060d}),this[_0x4b12f0(0x133)][_0x4b12f0(0x131)](_0x4b12f0(0x143))['to'](this,_0x4b12f0(0x130),_0x291f68=>!_0x291f68),this[_0x4b12f0(0x133)]['on'](_0x4b12f0(0x132),()=>{const _0x2fd0af=_0x4b12f0,_0x1374b1=!this[_0x2fd0af(0x133)][_0x2fd0af(0x140)];this[_0x2fd0af(0x133)][_0x2fd0af(0x136)]({'isOn':_0x1374b1,'icon':_0x1374b1?_0xa05531:_0x5a8945}),this[_0x2fd0af(0x144)](_0x2fd0af(0x148),_0x1374b1);});}}