@ckeditor/ckeditor5-operations-compressor
Version:
CKEditor 5 operations compressor for real-time collaboration.
23 lines • 4.03 kB
JavaScript
/*
* Copyright (c) 2003-2026, 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 _0x4fbf(_0x1b024,_0x2bf9a8){const _0x53c275=_0x53c2();return _0x4fbf=function(_0x4fbf60,_0x178657){_0x4fbf60=_0x4fbf60-0x1c9;let _0x811e2d=_0x53c275[_0x4fbf60];return _0x811e2d;},_0x4fbf(_0x1b024,_0x2bf9a8);}function _0x53c2(){const _0x3da0b3=['_compareOperations','_compressSingleOperation','targetPosition','2462714GbBWpq','buffers','3674907aiWOsa','5536321wTgTPm','sourcePosition','decompress','_getCompressorByName','wasUndone','6453050AVBvhG','28lYVEuj','12VJHOmS','compress','howMany','496295BbahKK','1405266IgckqY','root','__className','_context','$graveyard','_combineNext','_splitCurrent','14607824wsQrDG','1WAdDja','MoveOperation','_decompressSingleOperation','_checkOperation'];_0x53c2=function(){return _0x3da0b3;};return _0x53c2();}const _0x1321ab=_0x4fbf;(function(_0x5a6d9b,_0x1a8313){const _0x205ded=_0x4fbf,_0x5b5acb=_0x5a6d9b();while(!![]){try{const _0x2ef20c=parseInt(_0x205ded(0x1ce))/0x1*(parseInt(_0x205ded(0x1d5))/0x2)+parseInt(_0x205ded(0x1e3))/0x3+parseInt(_0x205ded(0x1de))/0x4*(-parseInt(_0x205ded(0x1e2))/0x5)+-parseInt(_0x205ded(0x1df))/0x6*(-parseInt(_0x205ded(0x1d8))/0x7)+-parseInt(_0x205ded(0x1cd))/0x8+-parseInt(_0x205ded(0x1d7))/0x9+parseInt(_0x205ded(0x1dd))/0xa;if(_0x2ef20c===_0x1a8313)break;else _0x5b5acb['push'](_0x5b5acb['shift']());}catch(_0x8e0e6c){_0x5b5acb['push'](_0x5b5acb['shift']());}}}(_0x53c2,0xf3990));import{ActionCompressor as _0x480938}from'./actioncompressor.js';import{arePositionsEqual as _0x9a6ff6}from'../utils.js';import{cloneDeep as _0x4b6b75}from'es-toolkit/compat';export class ForwardDeletingActionCompressor extends _0x480938{[_0x1321ab(0x1cb)](_0x2602bd,_0x32e661){const _0x43f350=_0x1321ab;return _0x32e661[_0x43f350(0x1e1)]++,_0x32e661;}[_0x1321ab(0x1cc)](_0x289aa8){const _0x482ee9=_0x1321ab,_0x568d88=_0x4b6b75(_0x289aa8);return _0x568d88[_0x482ee9(0x1e1)]=0x1,_0x289aa8[_0x482ee9(0x1e1)]--,_0x568d88;}[_0x1321ab(0x1d2)](_0x3e5a22,_0x4d014e){const _0x424c5a=_0x1321ab;return!(!this[_0x424c5a(0x1d1)](_0x3e5a22)||!this[_0x424c5a(0x1d1)](_0x4d014e))&&(_0x9a6ff6(_0x3e5a22[_0x424c5a(0x1d9)],_0x4d014e[_0x424c5a(0x1d9)])&&_0x9a6ff6(_0x3e5a22[_0x424c5a(0x1d4)],_0x4d014e[_0x424c5a(0x1d4)]));}[_0x1321ab(0x1d3)](_0xa2ebbe){const _0x432696=_0x1321ab,_0x460625={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x432696(0x1c9)][_0x432696(0x1db)](_0x432696(0x1cf))[_0x432696(0x1e0)](_0x460625,[_0xa2ebbe]),_0x460625[_0x432696(0x1d6)][0x0];}[_0x1321ab(0x1d0)](_0x49b211){const _0x31200f=_0x1321ab,_0x53b3ed=[];return this[_0x31200f(0x1c9)][_0x31200f(0x1db)](_0x31200f(0x1cf))[_0x31200f(0x1da)](_0x53b3ed,_0x49b211),_0x53b3ed[0x0];}[_0x1321ab(0x1d1)](_0x63f57d){const _0x1270dd=_0x1321ab;return _0x1270dd(0x1cf)==_0x63f57d[_0x1270dd(0x1e5)]&&_0x1270dd(0x1ca)==_0x63f57d[_0x1270dd(0x1d4)][_0x1270dd(0x1e4)]&&0x1==_0x63f57d[_0x1270dd(0x1e1)]&&!_0x63f57d[_0x1270dd(0x1dc)];}}