UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 3.54 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0xea29(_0x4e6c56,_0x258837){const _0x1a0ebf=_0x1a0e();return _0xea29=function(_0xea29b9,_0x1bb398){_0xea29b9=_0xea29b9-0x175;let _0x1669fe=_0x1a0ebf[_0xea29b9];return _0x1669fe;},_0xea29(_0x4e6c56,_0x258837);}function _0x1a0e(){const _0x31b9fe=['focus','isEnabled','editing','commands','1258620NypgsM','displayedPrompt','7xcOWWe','icon','ck-ai-quick-actions-button','set','bindTemplate','extendTemplate','723756btzqev','menuitem','7927272ULHbKi','locale','810200ojUJft','execute','parent','2074854SLkpPB','1451184QKZxEE','view','411806Snymkm','aiQuickAction'];_0x1a0e=function(){return _0x31b9fe;};return _0x1a0e();}(function(_0x9d261a,_0x3a9aae){const _0x516b5a=_0xea29,_0x5c98fa=_0x9d261a();while(!![]){try{const _0x11d52d=parseInt(_0x516b5a(0x180))/0x1+-parseInt(_0x516b5a(0x17a))/0x2+parseInt(_0x516b5a(0x176))/0x3+-parseInt(_0x516b5a(0x17e))/0x4+-parseInt(_0x516b5a(0x186))/0x5+-parseInt(_0x516b5a(0x17d))/0x6*(parseInt(_0x516b5a(0x188))/0x7)+parseInt(_0x516b5a(0x178))/0x8;if(_0x11d52d===_0x3a9aae)break;else _0x5c98fa['push'](_0x5c98fa['shift']());}catch(_0x2e90f8){_0x5c98fa['push'](_0x5c98fa['shift']());}}}(_0x1a0e,0x4400a));import{ButtonView as _0x12e533}from'ckeditor5/src/ui.js';import{IconAIQuickActions as _0x209dd2}from'@ckeditor/ckeditor5-icons';export function aiQuickActionsButtonCreator(_0x1a431e){const {editor:_0x13e27b,action:_0x14b22f,withText:_0xf01849=!0x1,withIcon:_0x3b74e1=!0x0,isInDropdown:_0x3c27b1=!0x0,shouldPreventFocus:_0x5761f9=!0x1}=_0x1a431e;return()=>{const _0x448998=_0xea29,_0x4fd74f=_0x13e27b[_0x448998(0x179)],_0x3889b2=new _0x12e533(_0x4fd74f),_0x3093c1=_0x3889b2[_0x448998(0x18c)];_0x3c27b1&&_0x3889b2[_0x448998(0x175)]({'on':{'mouseenter':_0x3093c1['to'](()=>{const _0x15b7f9=_0x448998;_0x5761f9&&_0x5761f9()||_0x3889b2[_0x15b7f9(0x182)]();})}});const _0x4e5f86=_0x14b22f[_0x448998(0x189)]??_0x14b22f[_0x448998(0x17c)]?.[_0x448998(0x189)];return _0x3889b2[_0x448998(0x18b)]({'label':_0x14b22f[_0x448998(0x187)],'withText':_0xf01849,'role':_0x448998(0x177),'icon':_0x3b74e1?_0x4e5f86??_0x209dd2:void 0x0,'tooltip':!_0xf01849,'class':_0x448998(0x18a),'isEnabled':_0x14b22f[_0x448998(0x183)]}),_0x3889b2['on'](_0x448998(0x17b),()=>{const _0x364560=_0x448998;_0x13e27b[_0x364560(0x184)][_0x364560(0x17f)][_0x364560(0x182)](),_0x13e27b[_0x364560(0x185)][_0x364560(0x17b)](_0x364560(0x181),_0x14b22f);}),_0x3889b2;};}