UNPKG

@ckeditor/ckeditor5-ai

Version:

AI Assistant feature for CKEditor 5.

23 lines 4.14 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 _0x87e046=_0x4f3e;(function(_0x519ab2,_0x3a9885){const _0x2cd5b6=_0x4f3e,_0x5f37d6=_0x519ab2();while(!![]){try{const _0x277457=-parseInt(_0x2cd5b6(0x127))/0x1+-parseInt(_0x2cd5b6(0x11c))/0x2*(parseInt(_0x2cd5b6(0x132))/0x3)+parseInt(_0x2cd5b6(0x123))/0x4*(parseInt(_0x2cd5b6(0x118))/0x5)+-parseInt(_0x2cd5b6(0x128))/0x6+-parseInt(_0x2cd5b6(0x115))/0x7*(-parseInt(_0x2cd5b6(0x126))/0x8)+-parseInt(_0x2cd5b6(0x130))/0x9+parseInt(_0x2cd5b6(0x110))/0xa;if(_0x277457===_0x3a9885)break;else _0x5f37d6['push'](_0x5f37d6['shift']());}catch(_0x5b6b59){_0x5f37d6['push'](_0x5f37d6['shift']());}}}(_0xe5b2,0x264b7));import{ToolbarView as _0x1cac23,ButtonView as _0x5ed8ab}from'ckeditor5/src/ui.js';function _0x4f3e(_0x518f66,_0x350d5c){const _0xe5b2be=_0xe5b2();return _0x4f3e=function(_0x4f3ea1,_0x3a8cd9){_0x4f3ea1=_0x4f3ea1-0x110;let _0x1c8256=_0xe5b2be[_0x4f3ea1];return _0x1c8256;},_0x4f3e(_0x518f66,_0x350d5c);}import{getTranslation as _0x4b3fb4}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x87e046(0x11d),'INSERT':_0x87e046(0x121)};function _0xe5b2(){const _0x20475c=['locale','Stop','872910nrjHHX','insertButton','138231oUeJik','bindTemplate','items','4477590MJACzG','set','extendTemplate','Insert\x20below','stopButton','357cVZTmk','AI_','REPLACE','148860CLjODj','tryAgainButton','replaceButton','Try\x20again','10UBxfVJ','replace','_CONTENT','_createButton','bind','insert','isVisible','32uJhMxm','label','ck-hidden','34696LcjloT','157996PnOGkv','1589376twsywL','ck-ai-form__toolbar','mainAction','addMany','ck-button-action','toUpperCase'];_0xe5b2=function(){return _0x20475c;};return _0xe5b2();}export default class lt extends _0x1cac23{constructor(_0x2d9d0a){const _0x57821f=_0x87e046;super(_0x2d9d0a),this[_0x57821f(0x111)](_0x57821f(0x122),!0x1),this[_0x57821f(0x111)](_0x57821f(0x12a),AIFormToolbarViewMainActionLabel[_0x57821f(0x117)]),this[_0x57821f(0x11a)]=this[_0x57821f(0x11f)]('',_0x57821f(0x12c)),this[_0x57821f(0x11a)][_0x57821f(0x120)](_0x57821f(0x124))['to'](this,_0x57821f(0x12a),_0x356594=>_0x4b3fb4(_0x2d9d0a,_0x57821f(0x116)+_0x356594[_0x57821f(0x12d)]()+_0x57821f(0x11e))),this[_0x57821f(0x131)]=this[_0x57821f(0x11f)](_0x4b3fb4(_0x2d9d0a,_0x57821f(0x113))),this[_0x57821f(0x119)]=this[_0x57821f(0x11f)](_0x4b3fb4(_0x2d9d0a,_0x57821f(0x11b))),this[_0x57821f(0x114)]=this[_0x57821f(0x11f)](_0x4b3fb4(_0x2d9d0a,_0x57821f(0x12f)));const _0x198909=this[_0x57821f(0x133)];this[_0x57821f(0x112)]({'attributes':{'class':[_0x57821f(0x129),_0x198909['if'](_0x57821f(0x122),_0x57821f(0x125),_0x428484=>!_0x428484)]}}),this[_0x57821f(0x134)][_0x57821f(0x12b)]([this[_0x57821f(0x11a)],this[_0x57821f(0x131)],this[_0x57821f(0x119)],this[_0x57821f(0x114)]]);}[_0x87e046(0x11f)](_0x232dd5,_0x1a20e7){const _0x5aba76=_0x87e046,_0x5d25d5=new _0x5ed8ab(this[_0x5aba76(0x12e)]);return _0x5d25d5[_0x5aba76(0x111)]({'label':_0x232dd5,'class':_0x1a20e7||'','isVisible':!0x0,'withText':!0x0}),_0x5d25d5;}}