@ckeditor/ckeditor5-operations-compressor
Version:
CKEditor 5 operations compressor for real-time collaboration.
23 lines • 4.03 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x192072=_0x2e7f;(function(_0x5d36cd,_0x49dc97){const _0x11a6ec=_0x2e7f,_0x193b25=_0x5d36cd();while(!![]){try{const _0x42c324=-parseInt(_0x11a6ec(0x139))/0x1+parseInt(_0x11a6ec(0x13b))/0x2+-parseInt(_0x11a6ec(0x129))/0x3*(-parseInt(_0x11a6ec(0x13e))/0x4)+parseInt(_0x11a6ec(0x128))/0x5*(parseInt(_0x11a6ec(0x12f))/0x6)+-parseInt(_0x11a6ec(0x134))/0x7+-parseInt(_0x11a6ec(0x13c))/0x8*(parseInt(_0x11a6ec(0x144))/0x9)+parseInt(_0x11a6ec(0x12e))/0xa;if(_0x42c324===_0x49dc97)break;else _0x193b25['push'](_0x193b25['shift']());}catch(_0x417a47){_0x193b25['push'](_0x193b25['shift']());}}}(_0x3a7b,0xea8b2));function _0x2e7f(_0x18b455,_0x4babc7){const _0x3a7b41=_0x3a7b();return _0x2e7f=function(_0x2e7fb1,_0x6a5bf6){_0x2e7fb1=_0x2e7fb1-0x128;let _0xa354f0=_0x3a7b41[_0x2e7fb1];return _0xa354f0;},_0x2e7f(_0x18b455,_0x4babc7);}function _0x3a7b(){const _0xf0ae72=['10460135QdKRUD','_compressSingleOperation','$graveyard','decompress','targetPosition','480912JdQgGu','_combineNext','526408OcpgeO','8rvxnek','_checkOperation','36CijBXX','compress','wasUndone','_context','_decompressSingleOperation','MoveOperation','6509754NpYCQN','1055550MPNVwi','13281guylOM','_getCompressorByName','_compareOperations','buffers','__className','29339460cRYdzQ','12SHysCs','_splitCurrent','root','sourcePosition','howMany'];_0x3a7b=function(){return _0xf0ae72;};return _0x3a7b();}import{ActionCompressor as _0x45c9b2}from'./actioncompressor.js';import{arePositionsEqual as _0x274958}from'../utils.js';import{cloneDeep as _0x23ef04}from'es-toolkit/compat';export class ForwardDeletingActionCompressor extends _0x45c9b2{[_0x192072(0x13a)](_0x5db761,_0x4348a5){const _0x28f9b6=_0x192072;return _0x4348a5[_0x28f9b6(0x133)]++,_0x4348a5;}[_0x192072(0x130)](_0x2a742f){const _0x407f26=_0x192072,_0x53ca40=_0x23ef04(_0x2a742f);return _0x53ca40[_0x407f26(0x133)]=0x1,_0x2a742f[_0x407f26(0x133)]--,_0x53ca40;}[_0x192072(0x12b)](_0x571467,_0x3c3f7c){const _0x195f75=_0x192072;return!(!this[_0x195f75(0x13d)](_0x571467)||!this[_0x195f75(0x13d)](_0x3c3f7c))&&(_0x274958(_0x571467[_0x195f75(0x132)],_0x3c3f7c[_0x195f75(0x132)])&&_0x274958(_0x571467[_0x195f75(0x138)],_0x3c3f7c[_0x195f75(0x138)]));}[_0x192072(0x135)](_0x12de9b){const _0x45421e=_0x192072,_0x26d26c={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x45421e(0x141)][_0x45421e(0x12a)](_0x45421e(0x143))[_0x45421e(0x13f)](_0x26d26c,[_0x12de9b]),_0x26d26c[_0x45421e(0x12c)][0x0];}[_0x192072(0x142)](_0x2c297b){const _0x44a554=_0x192072,_0x5e74b0=[];return this[_0x44a554(0x141)][_0x44a554(0x12a)](_0x44a554(0x143))[_0x44a554(0x137)](_0x5e74b0,_0x2c297b),_0x5e74b0[0x0];}[_0x192072(0x13d)](_0x1859ac){const _0x3fd5ab=_0x192072;return _0x3fd5ab(0x143)==_0x1859ac[_0x3fd5ab(0x12d)]&&_0x3fd5ab(0x136)==_0x1859ac[_0x3fd5ab(0x138)][_0x3fd5ab(0x131)]&&0x1==_0x1859ac[_0x3fd5ab(0x133)]&&!_0x1859ac[_0x3fd5ab(0x140)];}}