UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 6.75 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(_0x1d8b56,_0x53e729){const _0x583814=_0x1443,_0x4e4b39=_0x1d8b56();while(!![]){try{const _0x16a6a9=-parseInt(_0x583814(0x142))/0x1+parseInt(_0x583814(0x14a))/0x2*(-parseInt(_0x583814(0x157))/0x3)+parseInt(_0x583814(0x14d))/0x4*(-parseInt(_0x583814(0x145))/0x5)+parseInt(_0x583814(0x159))/0x6+parseInt(_0x583814(0x143))/0x7+-parseInt(_0x583814(0x149))/0x8+-parseInt(_0x583814(0x156))/0x9*(-parseInt(_0x583814(0x146))/0xa);if(_0x16a6a9===_0x53e729)break;else _0x4e4b39['push'](_0x4e4b39['shift']());}catch(_0x1666e3){_0x4e4b39['push'](_0x4e4b39['shift']());}}}(_0x31eb,0xb9f67));import{parseDocument as _0x22a3a6}from'htmlparser2';import{append as _0x48e68e,appendChild as _0x5c2016,find as _0x593854,findAll as _0x4cbf35,findOne as _0x20f2a0,getChildren as _0xb0e799,isComment as _0x3e1add,isTag as _0x398f0d,prepend as _0xc1f962,prependChild as _0x36defd,removeElement as _0x208761,replaceElement as _0x14e638,textContent as _0xbd54c3,getParent as _0x395a20,hasChildren as _0x2ef243}from'domutils';import _0x5825b0 from'dom-serializer';function _0x1443(_0x4cf7b2,_0x4374df){const _0x31eb67=_0x31eb();return _0x1443=function(_0x14430a,_0x26a852){_0x14430a=_0x14430a-0x142;let _0x2f79d3=_0x31eb67[_0x14430a];return _0x2f79d3;},_0x1443(_0x4cf7b2,_0x4374df);}import{cloneNode as _0x1013e4,isDocument as _0x121220,isText as _0x16a2ab,Element as _0x13ed0e,Text as _0x1b0ef4,Document as _0x5ce902,NodeWithChildren as _0x5bb2ac}from'domhandler';export{_0x1013e4 as cloneNode,_0x593854 as find,_0x20f2a0 as findOne,_0x4cbf35 as findAll,_0xb0e799 as getChildren,_0x395a20 as getParent,_0x3e1add as isComment,_0x121220 as isDocument,_0x398f0d as isTag,_0x16a2ab as isText,_0x48e68e as append,_0x5c2016 as appendChild,_0xc1f962 as prepend,_0x36defd as prependChild,_0x5825b0 as render,_0x208761 as removeElement,_0x14e638 as replaceElement,_0xbd54c3 as textContent,_0x2ef243 as hasChildren,_0x13ed0e as Element,_0x5ce902 as Document,_0x5bb2ac as NodeWithChildren,_0x1b0ef4 as Text};export function parse(_0x2b6e80){return _0x22a3a6(_0x2b6e80);}export function serialize(_0x32f277){return _0x5825b0(_0x32f277);}export function findByAttribute(_0x11bf55,_0x3c5aab,_0x19435d){const _0x51eebb=_0x1443,_0x21f587=null!==_0x3c5aab?_0xdbf8db=>_0xdbf8db[_0x51eebb(0x158)][_0x11bf55]===_0x3c5aab:_0x21e6d5=>Boolean(_0x21e6d5[_0x51eebb(0x158)][_0x11bf55]);return _0x20f2a0(_0x53aaa5=>_0x398f0d(_0x53aaa5)&&_0x21f587(_0x53aaa5),_0x19435d);}export function findAllByAttribute(_0x5df277,_0x41e91a,_0x572b28){const _0x7374e3=_0x1443,_0x779a15=null!==_0x41e91a?_0xd00200=>_0xd00200[_0x7374e3(0x158)][_0x5df277]===_0x41e91a:_0x1f0846=>Boolean(_0x1f0846[_0x7374e3(0x158)][_0x5df277]);return _0x4cbf35(_0x285cc0=>_0x398f0d(_0x285cc0)&&_0x779a15(_0x285cc0),_0x572b28);}export function findAllComments(_0x560ea7){return _0x593854(_0x3fcc48=>_0x3e1add(_0x3fcc48),_0x560ea7,!0x0,0x1/0x0);}export function getAttribute(_0xa1c79,_0x32af31){const _0x54cecd=_0x1443;return _0xa1c79&&_0x398f0d(_0xa1c79)?_0xa1c79[_0x54cecd(0x158)][_0x32af31]:null;}export function setAttribute(_0x186447,_0x12e7b6,_0x737fe2){const _0x2b028b=_0x1443;_0x398f0d(_0x186447)&&(null===_0x737fe2?delete _0x186447[_0x2b028b(0x158)][_0x12e7b6]:_0x186447[_0x2b028b(0x158)][_0x12e7b6]=_0x737fe2);}export function insertElement(_0x2797a8,_0x1aa1f3,_0x51b073){const _0x3e79bb=_0x1443,_0x100064=_0x1aa1f3[_0x3e79bb(0x14f)](!0x0);_0x3e79bb(0x150)===_0x51b073?_0xc1f962(_0x2797a8,_0x100064):_0x3e79bb(0x14c)===_0x51b073?_0x36defd(_0x2797a8,_0x100064):_0x3e79bb(0x155)===_0x51b073?_0x5c2016(_0x2797a8,_0x100064):_0x3e79bb(0x14e)===_0x51b073&&_0x48e68e(_0x2797a8,_0x100064);}export function moveElement(_0x5a4605,_0xb851c9){_0x208761(_0x5a4605),_0x14e638(_0xb851c9,_0x5a4605);}export function clone(_0xc7e754){const _0x15e6eb=_0x1443;return _0xc7e754[_0x15e6eb(0x14f)](!0x0);}export function getParents(_0xb5f813){const _0x1c4fdf=_0x1443,_0x214933=[];let _0x550a27=_0xb5f813;for(;_0x550a27;)_0x550a27=_0x395a20(_0x550a27),_0x550a27&&_0x214933[_0x1c4fdf(0x147)](_0x550a27);return _0x214933;}export function normalizeHTML(_0x3a84e5){const _0x3a5edc=_0x1443;return _0x3a84e5[_0x3a5edc(0x153)](/^\s+/gm,'')[_0x3a5edc(0x153)](/\s+$/gm,'')[_0x3a5edc(0x153)](/\n*/g,'')[_0x3a5edc(0x153)](/\s+/g,'\x20')[_0x3a5edc(0x153)](/>\s*</g,'><');}function _0x31eb(){const _0x1b5e39=['indexOf','nextSibling','replace','reverse','beforeend','63QEJhWQ','1501167nYkNvL','attribs','6872580BKJpuw','slice','1055982DRejXV','7641739LZfFlW','forEach','11020DnUxvv','2580760vjnSDi','push','map','11353672SWxDfa','2lbSitG','parentNode','afterbegin','556roHOuB','afterend','cloneNode','beforebegin'];_0x31eb=function(){return _0x1b5e39;};return _0x31eb();}export function areNodesSame(_0x20519a,_0x1e0760){return normalizeHTML(serialize(_0x20519a))===normalizeHTML(serialize(_0x1e0760));}export function getNodeNestingLevel(_0x59bd76){const _0x431f28=_0x1443;let _0xfdbb77=0x0;for(;_0x59bd76[_0x431f28(0x14b)];)_0x59bd76=_0x59bd76[_0x431f28(0x14b)],_0xfdbb77++;return _0xfdbb77;}export function removeElementsAfter(_0x2307eb){const _0x5d26ee=_0x1443,_0x367355=[];let _0xb192bf=_0x2307eb[_0x5d26ee(0x152)];for(;_0xb192bf;)_0x367355[_0x5d26ee(0x147)](_0xb192bf),_0xb192bf=_0xb192bf[_0x5d26ee(0x152)];_0x367355[_0x5d26ee(0x144)](_0x564e49=>{_0x208761(_0x564e49);});}export function getNodePath(_0x2f9341){const _0xa7f47b=_0x1443;return[_0x2f9341,...getParents(_0x2f9341)][_0xa7f47b(0x15a)](0x0,-0x1)[_0xa7f47b(0x148)](_0xe76f27=>{const _0xe2a8d0=_0xa7f47b,_0x309b9e=_0x395a20(_0xe76f27);return _0xb0e799(_0x309b9e)[_0xe2a8d0(0x151)](_0xe76f27);})[_0xa7f47b(0x154)]();}