UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 5 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(_0x1b577b,_0x24c90a){const _0x34e455=_0x5534,_0xd61cc8=_0x1b577b();while(!![]){try{const _0x34f64f=parseInt(_0x34e455(0x12c))/0x1+parseInt(_0x34e455(0x129))/0x2*(parseInt(_0x34e455(0x143))/0x3)+parseInt(_0x34e455(0x135))/0x4*(parseInt(_0x34e455(0x12d))/0x5)+parseInt(_0x34e455(0x134))/0x6+parseInt(_0x34e455(0x137))/0x7*(parseInt(_0x34e455(0x132))/0x8)+-parseInt(_0x34e455(0x128))/0x9*(parseInt(_0x34e455(0x12f))/0xa)+parseInt(_0x34e455(0x13d))/0xb*(-parseInt(_0x34e455(0x122))/0xc);if(_0x34f64f===_0x24c90a)break;else _0xd61cc8['push'](_0xd61cc8['shift']());}catch(_0x1a32d2){_0xd61cc8['push'](_0xd61cc8['shift']());}}}(_0x578d,0x3df91));function _0x5534(_0x487340,_0x4c242a){const _0x578d3d=_0x578d();return _0x5534=function(_0x5534fa,_0x38817c){_0x5534fa=_0x5534fa-0x121;let _0x257b29=_0x578d3d[_0x5534fa];return _0x257b29;},_0x5534(_0x487340,_0x4c242a);}import{transformOperationSets as _0x5969fa}from'ckeditor5/src/engine.js';function _0x578d(){const _0x1d86bc=['11bfViAt','getOperations','map','documentContextContent','operationsA','content','3624kjNLeN','name','type','get','oldRange','marker','node','6808884xaVEpu','model','data-id','shift','markers','previousSibling','1476OrqPzE','20XjmThP','cloneNode','getDocumentContext','383663XKLvJQ','25hJFROb','history','21730EwxImc','length','document','168uyNTfP','anchorId','200886afgFKW','396092JIvrxM','getRange','84427ZWLADd','getDiff','new','filter','removed','version'];_0x578d=function(){return _0x1d86bc;};return _0x578d();}import{append as _0xed3855,findByAttribute as _0x3d8c13,prependChild as _0x179400,removeElement as _0x303628,serialize as _0x68ebba}from'./htmlparser.js';export function getOperationsFromReply({editor:_0x5ad2c1,interaction:_0x3c32a0,reply:_0x293229,groups:_0x5cdb72,transform:_0x56050a,documentCompare:_0x31c618,documentCompareOptions:_0x483ecd}){const _0x3e4aa4=_0x5534,_0x4f4289=_0x3c32a0[_0x3e4aa4(0x12b)]();if(!_0x4f4289)return[];const _0x48f5dc=_0x4f4289[_0x3e4aa4(0x142)],_0xf187c8=_0x4f4289[_0x3e4aa4(0x13c)],_0x5a6399=_0x293229[_0x3e4aa4(0x140)][_0x3e4aa4(0x12a)](!0x0);for(const {changes:_0x39bcd8}of _0x5cdb72){const _0x50a1f2=_0x39bcd8[_0x3e4aa4(0x13a)](_0x15d7e4=>_0x3e4aa4(0x139)!=_0x15d7e4[_0x3e4aa4(0x145)])[_0x3e4aa4(0x13f)](_0x1dd642=>_0x3d8c13(_0x3e4aa4(0x124),_0x1dd642['id'],_0x5a6399)),_0x16f653=_0x39bcd8[_0x3e4aa4(0x13a)](_0x6c5bd5=>_0x3e4aa4(0x13b)!=_0x6c5bd5[_0x3e4aa4(0x145)])[_0x3e4aa4(0x13f)](_0x1b429e=>_0x1b429e[_0x3e4aa4(0x121)][_0x3e4aa4(0x12a)](!0x0));let _0x23e7d5=null;if(_0x50a1f2[_0x3e4aa4(0x130)]){_0x23e7d5=_0x50a1f2[0x0][_0x3e4aa4(0x127)];for(let _0x3ab929=0x0;_0x3ab929<_0x50a1f2[_0x3e4aa4(0x130)];_0x3ab929++)_0x303628(_0x50a1f2[_0x3ab929]);}if(_0x16f653[_0x3e4aa4(0x130)]){_0x23e7d5||(_0x39bcd8[0x0][_0x3e4aa4(0x133)]?_0x23e7d5=_0x3d8c13(_0x3e4aa4(0x124),_0x39bcd8[0x0][_0x3e4aa4(0x133)],_0x5a6399):(_0x23e7d5=_0x16f653[_0x3e4aa4(0x125)](),_0x179400(_0x5a6399,_0x23e7d5)));for(let _0x3df66d=0x0;_0x3df66d<_0x16f653[_0x3e4aa4(0x130)];_0x3df66d++)_0xed3855(_0x23e7d5,_0x16f653[_0x3df66d]),_0x23e7d5=_0x16f653[_0x3df66d];}}const _0x266e43=_0x68ebba(_0x5a6399),_0x23dcb7=_0x31c618[_0x3e4aa4(0x138)](_0x48f5dc,_0x266e43,_0x483ecd)[_0x3e4aa4(0x13e)]();if(_0x56050a){const _0x44354b=_0x5ad2c1[_0x3e4aa4(0x123)][_0x3e4aa4(0x131)][_0x3e4aa4(0x12e)][_0x3e4aa4(0x13e)](_0xf187c8),_0x4e3978={'document':_0x5ad2c1[_0x3e4aa4(0x123)][_0x3e4aa4(0x131)],'useRelations':!0x1,'padWithNoOps':!0x1};return _0x5969fa(_0x23dcb7,_0x44354b,_0x4e3978)[_0x3e4aa4(0x141)];}return _0x23dcb7;}export function fixMarkerOperationOldRange(_0x2a8d96,_0xd5f4bd){const _0x4996b6=_0x5534;if(_0x4996b6(0x148)!=_0xd5f4bd[_0x4996b6(0x145)])return;const _0x226758=_0x2a8d96[_0x4996b6(0x123)][_0x4996b6(0x126)][_0x4996b6(0x146)](_0xd5f4bd[_0x4996b6(0x144)]);_0x226758&&(_0xd5f4bd[_0x4996b6(0x147)]=_0x226758[_0x4996b6(0x136)]());}