@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 6.47 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 _0x56bf(){const _0x1f5f93=['4280616BlzCZv','submit','isEmpty','submitButtonView','enter','uiLanguageDirection','_createSubmitButton','showHistoryButtonView','ck-ai-form__submit','focusFirst','rtl','Submit','style','isOn','execute','width','fieldView','focus','_createShowHistoryButton','window','551712ApuIYk','477964oGuClL','isVisible','filteredView','focusLast','update','add','2204081plwavX','540890WHUgRj','History','isEnabled','focusCycler','fieldWrapperChildren','10WsbTNw','target','element','queryView','keystrokes','maxRows','value','right','21VuZFTZ','bind','excludeScrollbarsAndBorders','resultsView','requestAnimationFrame','minRows','focusableChildren','locale','2LpXCeT','children','1271370drcrzG','left','678416FBomTb','set','25kKGJJC','ck-ai-form__toggle-history','fire','render'];_0x56bf=function(){return _0x1f5f93;};return _0x56bf();}const _0x28f64b=_0x37d8;(function(_0x1c6d4f,_0x4c2bd8){const _0x2a5673=_0x37d8,_0x15bdfe=_0x1c6d4f();while(!![]){try{const _0x4911f7=parseInt(_0x2a5673(0x105))/0x1*(parseInt(_0x2a5673(0xf0))/0x2)+parseInt(_0x2a5673(0x123))/0x3+-parseInt(_0x2a5673(0x124))/0x4*(parseInt(_0x2a5673(0x10b))/0x5)+parseInt(_0x2a5673(0x107))/0x6*(parseInt(_0x2a5673(0xfd))/0x7)+-parseInt(_0x2a5673(0x109))/0x8+parseInt(_0x2a5673(0x10f))/0x9*(-parseInt(_0x2a5673(0xf5))/0xa)+parseInt(_0x2a5673(0x12a))/0xb;if(_0x4911f7===_0x4c2bd8)break;else _0x15bdfe['push'](_0x15bdfe['shift']());}catch(_0x4c86e6){_0x15bdfe['push'](_0x15bdfe['shift']());}}}(_0x56bf,0x62619));import{Rect as _0x36f8b5,global as _0x4a8305,isVisible as _0x248088}from'ckeditor5/src/utils.js';import{IconHistory as _0xf381d,IconSubmit as _0xe11b46}from'ckeditor5/src/icons.js';import{AutocompleteView as _0x5ebec1,ButtonView as _0x2ef5ab}from'ckeditor5/src/ui.js';function _0x37d8(_0x3a8ba2,_0x505a89){const _0x56bf10=_0x56bf();return _0x37d8=function(_0x37d87c,_0x38d32f){_0x37d87c=_0x37d87c-0xf0;let _0x7dc401=_0x56bf10[_0x37d87c];return _0x7dc401;},_0x37d8(_0x3a8ba2,_0x505a89);}import{getTranslation as _0x388760}from'../../utils/common-translations.js';export class AIFormPromptView extends _0x5ebec1{[_0x28f64b(0x112)];[_0x28f64b(0x116)];constructor(_0x42db04,_0x1d49fe){const _0x20420a=_0x28f64b;super(_0x42db04,_0x1d49fe),this[_0x20420a(0xf8)][_0x20420a(0x11f)][_0x20420a(0x102)]=0x1,this[_0x20420a(0xf8)][_0x20420a(0x11f)][_0x20420a(0xfa)]=0x3,this[_0x20420a(0x112)]=this[_0x20420a(0x115)](),this[_0x20420a(0x116)]=this[_0x20420a(0x121)](),this[_0x20420a(0x103)][_0x20420a(0x129)](this[_0x20420a(0x116)],0x1),this[_0x20420a(0x103)][_0x20420a(0x129)](this[_0x20420a(0x112)]);}[_0x28f64b(0x10e)](){const _0x261b6f=_0x28f64b;super[_0x261b6f(0x10e)](),this[_0x261b6f(0xf8)][_0x261b6f(0xf4)][_0x261b6f(0x129)](this[_0x261b6f(0x116)]),this[_0x261b6f(0x106)][_0x261b6f(0x129)](this[_0x261b6f(0x112)]),this[_0x261b6f(0xf9)][_0x261b6f(0x10a)](_0x261b6f(0x113),(_0x4f8d74,_0x1e356f)=>{const _0x15d992=_0x261b6f;_0x4f8d74[_0x15d992(0xf6)]==this[_0x15d992(0xf8)][_0x15d992(0x11f)][_0x15d992(0xf7)]&&(this[_0x15d992(0x110)](),_0x1e356f());});}[_0x28f64b(0x115)](){const _0x2b8860=_0x28f64b,_0x46af3f=new _0x2ef5ab(this[_0x2b8860(0x104)]),_0x2466e4=this[_0x2b8860(0x104)];return _0x46af3f[_0x2b8860(0x10a)]({'icon':_0xe11b46,'label':_0x388760(_0x2466e4,_0x2b8860(0x11a)),'isVisible':!0x0,'tooltip':!0x0,'class':_0x2b8860(0x117)}),_0x46af3f['on'](_0x2b8860(0x11d),()=>{const _0x2b0cb1=_0x2b8860;this[_0x2b0cb1(0x110)]();}),_0x46af3f[_0x2b8860(0xfe)](_0x2b8860(0xf2))['to'](this[_0x2b8860(0xf8)][_0x2b8860(0x11f)],_0x2b8860(0x111),this,_0x2b8860(0xf2),(_0x5e0710,_0x1d8ff1)=>!_0x5e0710&&_0x1d8ff1),_0x46af3f;}[_0x28f64b(0x121)](){const _0x29bb8b=_0x28f64b,_0x2c1dd8=new _0x2ef5ab(this[_0x29bb8b(0x104)]),_0x11c8ad=this[_0x29bb8b(0x100)],_0x3586bc=this[_0x29bb8b(0x104)];_0x2c1dd8[_0x29bb8b(0x10a)]({'label':_0x388760(_0x3586bc,_0x29bb8b(0xf1)),'withText':!0x1,'icon':_0xf381d,'tooltip':!0x0,'tooltipPosition':'sw','class':_0x29bb8b(0x10c)}),_0x2c1dd8[_0x29bb8b(0xfe)](_0x29bb8b(0x11c))['to'](_0x11c8ad,_0x29bb8b(0x125)),_0x2c1dd8[_0x29bb8b(0xfe)](_0x29bb8b(0xf2))['to'](this,_0x29bb8b(0xf2)),_0x2c1dd8['on'](_0x29bb8b(0x11d),()=>{const _0x3a0dc3=_0x29bb8b;_0x11c8ad[_0x3a0dc3(0x125)]=!_0x11c8ad[_0x3a0dc3(0x125)],_0x11c8ad[_0x3a0dc3(0x125)]?this[_0x3a0dc3(0x126)][_0x3a0dc3(0x120)]():this[_0x3a0dc3(0x120)]();});const _0x3bc969=()=>{const _0x100744=_0x29bb8b;_0x4a8305[_0x100744(0x122)][_0x100744(0x101)](()=>{const _0x30ffa1=_0x100744;if(_0x248088(this[_0x30ffa1(0xf7)])){const _0x4cc2bd=new _0x36f8b5(this[_0x30ffa1(0xf8)][_0x30ffa1(0x11f)][_0x30ffa1(0xf7)]),_0xe4d183=_0x4cc2bd[_0x30ffa1(0x11e)],_0x2314fa=_0x30ffa1(0x119)===_0x3586bc[_0x30ffa1(0x114)]?_0x30ffa1(0x108):_0x30ffa1(0xfc);_0x4cc2bd[_0x30ffa1(0xff)](),_0x2c1dd8[_0x30ffa1(0xf7)][_0x30ffa1(0x11b)][_0x2314fa]=_0xe4d183-_0x4cc2bd[_0x30ffa1(0x11e)]+0x1+'px';}});};return this[_0x29bb8b(0xf8)][_0x29bb8b(0x11f)]['on'](_0x29bb8b(0x128),_0x3bc969),this['on'](_0x29bb8b(0x10e),_0x3bc969),_0x2c1dd8;}[_0x28f64b(0x110)](){const _0xb80ae6=_0x28f64b,_0x224aed=this[_0xb80ae6(0xf8)][_0xb80ae6(0x11f)][_0xb80ae6(0xf7)][_0xb80ae6(0xfb)];this[_0xb80ae6(0x10d)](_0xb80ae6(0x110),_0x224aed);}[_0x28f64b(0x120)](_0xe05b63){const _0x27b68a=_0x28f64b;-0x1===_0xe05b63?this[_0x27b68a(0xf3)][_0x27b68a(0x127)]():this[_0x27b68a(0xf3)][_0x27b68a(0x118)]();}}