@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 4.14 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 _0x4e96fd=_0x2e9b;function _0x2924(){const _0x31cba6=['insert','stopButton','AI_','ck-button-action','572159JJmZXw','set','_createButton','1682777SzwJze','10313728MmAnPT','11ZPvdrx','toUpperCase','ck-ai-form__toolbar','ck-hidden','replaceButton','items','2cyOAfs','tryAgainButton','5112606wzgMHT','9jdkULM','REPLACE','label','6FXOaar','isVisible','locale','addMany','extendTemplate','mainAction','Insert\x20below','insertButton','_CONTENT','replace','65228810MEdkoO','3380840igVWKj','bind','bindTemplate','8275515wuiHAR','Try\x20again','Stop'];_0x2924=function(){return _0x31cba6;};return _0x2924();}(function(_0x242c6a,_0x4cd8a8){const _0x5e0d52=_0x2e9b,_0xc6b22c=_0x242c6a();while(!![]){try{const _0xfc2197=-parseInt(_0x5e0d52(0xd0))/0x1*(parseInt(_0x5e0d52(0xd8))/0x2)+-parseInt(_0x5e0d52(0xda))/0x3+parseInt(_0x5e0d52(0xc3))/0x4+-parseInt(_0x5e0d52(0xc6))/0x5+parseInt(_0x5e0d52(0xb8))/0x6*(-parseInt(_0x5e0d52(0xcd))/0x7)+-parseInt(_0x5e0d52(0xd1))/0x8*(parseInt(_0x5e0d52(0xdb))/0x9)+-parseInt(_0x5e0d52(0xc2))/0xa*(-parseInt(_0x5e0d52(0xd2))/0xb);if(_0xfc2197===_0x4cd8a8)break;else _0xc6b22c['push'](_0xc6b22c['shift']());}catch(_0x56c94d){_0xc6b22c['push'](_0xc6b22c['shift']());}}}(_0x2924,0xe92b0));function _0x2e9b(_0x582c27,_0xe3d752){const _0x292499=_0x2924();return _0x2e9b=function(_0x2e9b44,_0x46a28d){_0x2e9b44=_0x2e9b44-0xb6;let _0x334077=_0x292499[_0x2e9b44];return _0x334077;},_0x2e9b(_0x582c27,_0xe3d752);}import{ToolbarView as _0x100ca3,ButtonView as _0x2f4e03}from'ckeditor5/src/ui.js';import{getTranslation as _0x25448f}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x4e96fd(0xc1),'INSERT':_0x4e96fd(0xc9)};export class AIFormToolbarView extends _0x100ca3{constructor(_0x74e037){const _0xe5028b=_0x4e96fd;super(_0x74e037),this[_0xe5028b(0xce)](_0xe5028b(0xb9),!0x1),this[_0xe5028b(0xce)](_0xe5028b(0xbd),AIFormToolbarViewMainActionLabel[_0xe5028b(0xb6)]),this[_0xe5028b(0xd6)]=this[_0xe5028b(0xcf)]('',_0xe5028b(0xcc)),this[_0xe5028b(0xd6)][_0xe5028b(0xc4)](_0xe5028b(0xb7))['to'](this,_0xe5028b(0xbd),_0x7f3257=>_0x25448f(_0x74e037,_0xe5028b(0xcb)+_0x7f3257[_0xe5028b(0xd3)]()+_0xe5028b(0xc0))),this[_0xe5028b(0xbf)]=this[_0xe5028b(0xcf)](_0x25448f(_0x74e037,_0xe5028b(0xbe))),this[_0xe5028b(0xd9)]=this[_0xe5028b(0xcf)](_0x25448f(_0x74e037,_0xe5028b(0xc7))),this[_0xe5028b(0xca)]=this[_0xe5028b(0xcf)](_0x25448f(_0x74e037,_0xe5028b(0xc8)));const _0x7096c9=this[_0xe5028b(0xc5)];this[_0xe5028b(0xbc)]({'attributes':{'class':[_0xe5028b(0xd4),_0x7096c9['if'](_0xe5028b(0xb9),_0xe5028b(0xd5),_0x203cae=>!_0x203cae)]}}),this[_0xe5028b(0xd7)][_0xe5028b(0xbb)]([this[_0xe5028b(0xd6)],this[_0xe5028b(0xbf)],this[_0xe5028b(0xd9)],this[_0xe5028b(0xca)]]);}[_0x4e96fd(0xcf)](_0x2e54a3,_0x4daef4){const _0x2e60b1=_0x4e96fd,_0x3c0725=new _0x2f4e03(this[_0x2e60b1(0xba)]);return _0x3c0725[_0x2e60b1(0xce)]({'label':_0x2e54a3,'class':_0x4daef4||'','isVisible':!0x0,'withText':!0x0}),_0x3c0725;}}