@ckeditor/ckeditor5-operations-compressor
Version:
CKEditor 5 operations compressor for real-time collaboration.
23 lines • 5.42 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 _0x2779(_0x27a1db,_0x1a49ef){const _0x5e6b28=_0x5e6b();return _0x2779=function(_0x2779b0,_0x5caba7){_0x2779b0=_0x2779b0-0x1ea;let _0x522751=_0x5e6b28[_0x2779b0];return _0x522751;},_0x2779(_0x27a1db,_0x1a49ef);}const _0x240937=_0x2779;(function(_0x3b3ac4,_0x54f018){const _0x25a51c=_0x2779,_0x4edee6=_0x3b3ac4();while(!![]){try{const _0x2761c6=parseInt(_0x25a51c(0x1f2))/0x1*(parseInt(_0x25a51c(0x209))/0x2)+parseInt(_0x25a51c(0x20c))/0x3+-parseInt(_0x25a51c(0x1fa))/0x4*(parseInt(_0x25a51c(0x1f0))/0x5)+-parseInt(_0x25a51c(0x208))/0x6*(parseInt(_0x25a51c(0x20b))/0x7)+-parseInt(_0x25a51c(0x211))/0x8*(parseInt(_0x25a51c(0x1ed))/0x9)+-parseInt(_0x25a51c(0x202))/0xa*(-parseInt(_0x25a51c(0x20e))/0xb)+parseInt(_0x25a51c(0x1f4))/0xc*(-parseInt(_0x25a51c(0x1fd))/0xd);if(_0x2761c6===_0x54f018)break;else _0x4edee6['push'](_0x4edee6['shift']());}catch(_0x490e40){_0x4edee6['push'](_0x4edee6['shift']());}}}(_0x5e6b,0xf0718));import{ActionCompressor as _0x4c5c4f}from'./actioncompressor.js';import{arePositionsEqual as _0x386b0d,getPositionShiftedBy as _0x5ac028}from'../utils.js';function _0x5e6b(){const _0x41ea96=['115YbSaly','InsertOperation','1863583FzsVko','_context','8484540vVIyzh','nodes','next','_decompressSingleOperation','compress','length','98816wwqFzM','position','_compareAttributes','13bpWWmS','_splitCurrent','substr','_compareOperations','_checkOperation','20AxHEVS','decompress','_compressSingleOperation','keys','__className','wasUndone','4146lAPGfW','2CPBEQL','value','8414uXQfOK','1749723hSjBIu','_getCompressorByName','10064351LWFsVT','attributes','from','1355464oyLcMj','every','iterator','buffers','63yodeyE','data','_combineNext'];_0x5e6b=function(){return _0x41ea96;};return _0x5e6b();}import{cloneDeep as _0x2d6e08}from'es-toolkit/compat';export class TypingActionCompressor extends _0x4c5c4f{[_0x240937(0x1ef)](_0x55c1a0,_0x429d62){const _0x1cf986=_0x240937;return _0x429d62[_0x1cf986(0x1f5)][0x0][_0x1cf986(0x1ee)]+=_0x55c1a0[_0x1cf986(0x1f5)][0x0][_0x1cf986(0x1ee)],_0x429d62;}[_0x240937(0x1fe)](_0x4cb918){const _0xc1b427=_0x240937,_0x278b94=_0x2d6e08(_0x4cb918),_0x13ccaa=_0x278b94[_0xc1b427(0x1f5)][0x0],_0x490695=_0x4cb918[_0xc1b427(0x1f5)][0x0],_0x470dbd=_0x490695[_0xc1b427(0x1ee)][Symbol[_0xc1b427(0x1eb)]]()[_0xc1b427(0x1f6)]()[_0xc1b427(0x20a)],_0x343c0a=_0x470dbd[_0xc1b427(0x1f9)];return _0x13ccaa[_0xc1b427(0x1ee)]=_0x470dbd,_0x490695[_0xc1b427(0x1ee)]=_0x490695[_0xc1b427(0x1ee)][_0xc1b427(0x1ff)](_0x343c0a),_0x4cb918[_0xc1b427(0x1fb)]=_0x5ac028(_0x4cb918[_0xc1b427(0x1fb)],_0x343c0a),_0x278b94;}[_0x240937(0x200)](_0xe145e2,_0x456a81){const _0x1e21d2=_0x240937;if(this[_0x1e21d2(0x201)](_0xe145e2)&&this[_0x1e21d2(0x201)](_0x456a81)){const _0x2f2344=_0xe145e2[_0x1e21d2(0x1f5)][0x0][_0x1e21d2(0x1ee)][_0x1e21d2(0x1f9)],_0xae5a88=_0x386b0d(_0x5ac028(_0xe145e2[_0x1e21d2(0x1fb)],_0x2f2344),_0x456a81[_0x1e21d2(0x1fb)]),_0x4b0947=_0xe145e2[_0x1e21d2(0x1f5)][0x0],_0x112e4b=_0x456a81[_0x1e21d2(0x1f5)][0x0];return _0xae5a88&&this[_0x1e21d2(0x1fc)](_0x4b0947,_0x112e4b);}return!0x1;}[_0x240937(0x204)](_0x4477aa){const _0x52f469=_0x240937,_0xe36e2a={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x52f469(0x1f3)][_0x52f469(0x20d)](_0x52f469(0x1f1))[_0x52f469(0x1f8)](_0xe36e2a,[_0x4477aa]),_0xe36e2a[_0x52f469(0x1ec)][0x0];}[_0x240937(0x1f7)](_0x259774){const _0x289704=_0x240937,_0x349c7e=[];return this[_0x289704(0x1f3)][_0x289704(0x20d)](_0x289704(0x1f1))[_0x289704(0x203)](_0x349c7e,_0x259774),_0x349c7e[0x0];}[_0x240937(0x201)](_0x4f8c48){const _0x1fa45c=_0x240937;return _0x1fa45c(0x1f1)==_0x4f8c48[_0x1fa45c(0x206)]&&0x1==_0x4f8c48[_0x1fa45c(0x1f5)][_0x1fa45c(0x1f9)]&&_0x4f8c48[_0x1fa45c(0x1f5)][0x0][_0x1fa45c(0x1ee)]&&!_0x4f8c48[_0x1fa45c(0x207)]&&0x1==Array[_0x1fa45c(0x210)](_0x4f8c48[_0x1fa45c(0x1f5)][0x0][_0x1fa45c(0x1ee)])[_0x1fa45c(0x1f9)];}[_0x240937(0x1fc)](_0x54fb7e,_0x182c94){const _0x3704d6=_0x240937,_0x3ed67=Object[_0x3704d6(0x205)](_0x54fb7e[_0x3704d6(0x20f)]||{}),_0x201e9f=Object[_0x3704d6(0x205)](_0x182c94[_0x3704d6(0x20f)]||{});return _0x3ed67[_0x3704d6(0x1f9)]===_0x201e9f[_0x3704d6(0x1f9)]&&_0x3ed67[_0x3704d6(0x1ea)](_0x33aef4=>_0x182c94[_0x3704d6(0x20f)][_0x33aef4]&&_0x182c94[_0x3704d6(0x20f)][_0x33aef4]===_0x54fb7e[_0x3704d6(0x20f)][_0x33aef4]);}}