UNPKG

@ckeditor/ckeditor5-operations-compressor

Version:

CKEditor 5 operations compressor for real-time collaboration.

23 lines 4.96 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 _0x3729(_0x39d57e,_0x367433){const _0x29e481=_0x29e4();return _0x3729=function(_0x372961,_0x1f05f9){_0x372961=_0x372961-0x6a;let _0x3ac942=_0x29e481[_0x372961];return _0x3ac942;},_0x3729(_0x39d57e,_0x367433);}const _0x53dc19=_0x3729;(function(_0x1e0fd5,_0x1a7377){const _0x1e9d76=_0x3729,_0xf366e1=_0x1e0fd5();while(!![]){try{const _0x3b1efc=-parseInt(_0x1e9d76(0x85))/0x1*(-parseInt(_0x1e9d76(0x6b))/0x2)+parseInt(_0x1e9d76(0x7c))/0x3+-parseInt(_0x1e9d76(0x6c))/0x4*(-parseInt(_0x1e9d76(0x84))/0x5)+parseInt(_0x1e9d76(0x87))/0x6+-parseInt(_0x1e9d76(0x8b))/0x7+parseInt(_0x1e9d76(0x8a))/0x8*(parseInt(_0x1e9d76(0x6a))/0x9)+-parseInt(_0x1e9d76(0x6f))/0xa;if(_0x3b1efc===_0x1a7377)break;else _0xf366e1['push'](_0xf366e1['shift']());}catch(_0xfc16e5){_0xf366e1['push'](_0xf366e1['shift']());}}}(_0x29e4,0x949f6));import{ActionCompressor as _0x4632c9}from'./actioncompressor.js';import{arePositionsEqual as _0x16f979}from'../utils.js';function _0x29e4(){const _0x1420bb=['12524330cEDjiZ','end','shift','MarkerOperation','types','oldRange','user:','_decompressSingleOperation','user:position:','_context','_getCompressorByName','split','_compareOperations','3281541FKOdak','stickiness','newRange','name','_compressSingleOperation','compress','start','__className','5dNChRt','31951zWKVUh','buffers','594420PVStKd','decompress','startsWith','664dJJxGc','5728457UBlwjt','push','90990wrjzCW','22DvOqMI','1184136XMogrO','_id','toNone'];_0x29e4=function(){return _0x1420bb;};return _0x29e4();}import{cloneDeep as _0x2c64a9}from'es-toolkit/compat';export class UserSelectionActionCompressor extends _0x4632c9{[_0x53dc19(0x81)](_0xcebb75,_0xbfaccc){const _0x38a2cb=_0x53dc19;if(!this[_0x38a2cb(0x7b)](_0xbfaccc[0x0],_0xbfaccc[0x1]))return!0x1;const _0x4c605e=_0xbfaccc[_0x38a2cb(0x71)]();return _0x4c605e[_0x38a2cb(0x74)]=null,_0x4c605e[_0x38a2cb(0x7e)]&&_0x16f979(_0x4c605e[_0x38a2cb(0x7e)][_0x38a2cb(0x82)],_0x4c605e[_0x38a2cb(0x7e)][_0x38a2cb(0x70)])&&(_0x4c605e[_0x38a2cb(0x7e)][_0x38a2cb(0x70)]=null),_0xbfaccc[_0x38a2cb(0x71)](),_0xcebb75[_0x38a2cb(0x73)][_0x38a2cb(0x8c)](this[_0x38a2cb(0x6d)]),_0xcebb75[_0x38a2cb(0x73)][_0x38a2cb(0x8c)](0x0),_0xcebb75[_0x38a2cb(0x86)][_0x38a2cb(0x8c)](this[_0x38a2cb(0x80)](_0x4c605e)),!0x0;}[_0x53dc19(0x88)](_0x46a891,_0x5f2036){const _0x2af285=_0x53dc19,_0x2d3633=this[_0x2af285(0x76)](_0x5f2036);_0x2d3633[_0x2af285(0x7e)]&&!_0x2d3633[_0x2af285(0x7e)][_0x2af285(0x70)]&&(_0x2d3633[_0x2af285(0x7e)][_0x2af285(0x70)]=_0x2c64a9(_0x2d3633[_0x2af285(0x7e)][_0x2af285(0x82)]));const _0x1b4575=_0x2c64a9(_0x2d3633);_0x1b4575[_0x2af285(0x7e)]&&(_0x1b4575[_0x2af285(0x7e)][_0x2af285(0x82)][_0x2af285(0x7d)]=_0x2af285(0x6e),_0x1b4575[_0x2af285(0x7e)][_0x2af285(0x70)]=_0x2c64a9(_0x1b4575[_0x2af285(0x7e)][_0x2af285(0x82)])),_0x1b4575[_0x2af285(0x7f)]=_0x2af285(0x77)+_0x1b4575[_0x2af285(0x7f)][_0x2af285(0x7a)](':')[0x2],_0x5f2036[_0x2af285(0x73)][_0x2af285(0x71)](),_0x46a891[_0x2af285(0x8c)](_0x2d3633),_0x46a891[_0x2af285(0x8c)](_0x1b4575);}[_0x53dc19(0x80)](_0x4226e4){const _0x2ce984=_0x53dc19,_0x200b30={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x2ce984(0x78)][_0x2ce984(0x79)](_0x2ce984(0x72))[_0x2ce984(0x81)](_0x200b30,[_0x4226e4]),_0x200b30[_0x2ce984(0x86)][0x0];}[_0x53dc19(0x76)](_0xd3a66f){const _0x36e38a=_0x53dc19,_0x45c2e=[];return this[_0x36e38a(0x78)][_0x36e38a(0x79)](_0x36e38a(0x72))[_0x36e38a(0x88)](_0x45c2e,_0xd3a66f),_0x45c2e[0x0];}[_0x53dc19(0x7b)](_0x3478ab,_0x2a0f66){const _0x559eea=_0x53dc19;return!(!_0x3478ab||!_0x2a0f66)&&(_0x559eea(0x72)==_0x3478ab[_0x559eea(0x83)]&&_0x559eea(0x72)==_0x2a0f66[_0x559eea(0x83)]&&!(!_0x3478ab[_0x559eea(0x7f)][_0x559eea(0x89)](_0x559eea(0x75))||!_0x2a0f66[_0x559eea(0x7f)][_0x559eea(0x89)](_0x559eea(0x75))||_0x3478ab[_0x559eea(0x7f)]==_0x2a0f66[_0x559eea(0x7f)]));}}