@ckeditor/ckeditor5-operations-compressor 36.0.1 → 37.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +14 -4
  2. package/src/actioncompressor/actioncompressor.d.ts +56 -0
  3. package/src/actioncompressor/actioncompressor.js +1 -1
  4. package/src/actioncompressor/deletingactioncompressor.d.ts +24 -0
  5. package/src/actioncompressor/deletingactioncompressor.js +1 -1
  6. package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +24 -0
  7. package/src/actioncompressor/forwarddeletingactioncompressor.js +1 -1
  8. package/src/actioncompressor/typingactioncompressor.d.ts +24 -0
  9. package/src/actioncompressor/typingactioncompressor.js +1 -1
  10. package/src/actioncompressor/userselectionactioncompressor.d.ts +12 -0
  11. package/src/actioncompressor/userselectionactioncompressor.js +1 -1
  12. package/src/compressor.d.ts +41 -0
  13. package/src/compressor.js +1 -1
  14. package/src/lib/compiledmessages.d.ts +1435 -0
  15. package/src/lib/compiledmessages.js +23 -0
  16. package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +18 -0
  17. package/src/operationcompressor/annotationmarkeroperationcompressor.js +1 -1
  18. package/src/operationcompressor/attributeoperationcompressor.d.ts +13 -0
  19. package/src/operationcompressor/attributeoperationcompressor.js +1 -1
  20. package/src/operationcompressor/insertoperationcompressor.d.ts +13 -0
  21. package/src/operationcompressor/insertoperationcompressor.js +1 -1
  22. package/src/operationcompressor/markeroperationcompressor.d.ts +9 -0
  23. package/src/operationcompressor/markeroperationcompressor.js +1 -1
  24. package/src/operationcompressor/nooperationcompressor.d.ts +16 -0
  25. package/src/operationcompressor/nooperationcompressor.js +1 -1
  26. package/src/operationcompressor/operationcompressor.d.ts +24 -0
  27. package/src/operationcompressor/operationcompressor.js +1 -1
  28. package/src/protobufdescriptions.d.ts +12 -0
  29. package/src/protobufdescriptions.js +23 -0
  30. package/src/protobuffactory.d.ts +1 -0
  31. package/src/protobuffactory.js +1 -1
  32. package/src/utils.d.ts +26 -0
  33. package/src/utils.js +1 -1
  34. package/src/commondescriptions.js +0 -23
  35. package/src/errors.jsdoc +0 -18
  36. package/src/operationcompressor/mergeoperationcompressor.js +0 -23
  37. package/src/operationcompressor/moveoperationcompressor.js +0 -23
  38. package/src/operationcompressor/renameoperationcompressor.js +0 -23
  39. package/src/operationcompressor/rootattributeoperationcompressor.js +0 -23
  40. package/src/operationcompressor/splitoperationcompressor.js +0 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-operations-compressor",
3
- "version": "36.0.1",
3
+ "version": "37.0.0",
4
4
  "description": "CKEditor 5 operations compressor for real-time collaboration.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://ckeditor.com/collaboration/real-time/",
@@ -27,8 +27,18 @@
27
27
  ],
28
28
  "author": "CKSource (http://cksource.com/)",
29
29
  "dependencies": {
30
- "ckeditor5": "^36.0.1",
30
+ "ckeditor5": "^37.0.0",
31
31
  "lodash-es": "^4.17.11",
32
- "protobufjs": "^6.8.8"
33
- }
32
+ "protobufjs": "^7.0.0"
33
+ },
34
+ "files": [
35
+ "src/**/*.js",
36
+ "src/**/*.d.ts",
37
+ "CHANGELOG.md"
38
+ ],
39
+ "scripts": {
40
+ "build": "tsc -p ./tsconfig.json",
41
+ "postversion": "npm run build"
42
+ },
43
+ "obfuscated": true
34
44
  }
@@ -0,0 +1,56 @@
1
+ import type { CompressedOperationsData, default as Compressor } from '../compressor';
2
+ /**
3
+ * * Compresses and decompresses multiple operations into the one buffer.
4
+ */
5
+ export default abstract class ActionCompressor {
6
+ constructor(id: number, context: Compressor);
7
+ /**
8
+ * Combines and compress operations from the list.
9
+ * Operations are consumed as long as match this compressor.
10
+ *
11
+ * @param result Object to which compression result should be added.
12
+ * @param operations List of operations in JSON format to compress.
13
+ * @returns `true` when operation is consumed `false` otherwise.
14
+ */
15
+ compress(result: CompressedOperationsData, operations: Array<any>): boolean;
16
+ /**
17
+ * Decompress and split compressed operations. Decompressed operations are consumed (removed from the input data).
18
+ *
19
+ * @param result Decompressed operations in JSON format.
20
+ * @param data Compressed operations data.
21
+ */
22
+ decompress(result: Array<any>, data: CompressedOperationsData): void;
23
+ /**
24
+ * Compresses single operation using a proper compressor.
25
+ *
26
+ * @param operation Operation in JSON format.
27
+ * @returns Operation JSON compressed to the binary format.
28
+ */
29
+ protected abstract _compressSingleOperation(operation: any): Uint8Array;
30
+ /**
31
+ * Decompresses combined operation using a proper compressor.
32
+ *
33
+ * @param data Data to compress.
34
+ * @returns Decompressed operation in JSON format.
35
+ */
36
+ protected abstract _decompressSingleOperation(data: CompressedOperationsData): any;
37
+ /**
38
+ * Combine next operation into the combined one.
39
+ *
40
+ * @param nextOperation Operation to combine in JSON format.
41
+ * @param combined Combined operation in JSON format.
42
+ * @returns Combined operation in JSON format.
43
+ */
44
+ protected abstract _combineNext(nextOperation: any, combined: any): any;
45
+ /**
46
+ * Split operation from combined one.
47
+ *
48
+ * @param combined Combined operation in JSON format.
49
+ * @returns Split operation in JSON format.
50
+ */
51
+ protected abstract _splitCurrent(combined: any): any;
52
+ /**
53
+ * Checks if two operations can be combined.
54
+ */
55
+ protected abstract _compareOperations(opA: any, opB: any): boolean;
56
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x43a4=['compress','_splitCurrent','buffers','decompress','types','shift','_context','_decompressSingleOperation','push','_combineNext'];(function(_0x8ec5fc,_0x43a46b){const _0x8d228f=function(_0x60faf5){while(--_0x60faf5){_0x8ec5fc['push'](_0x8ec5fc['shift']());}};_0x8d228f(++_0x43a46b);}(_0x43a4,0x89));const _0x8d22=function(_0x8ec5fc,_0x43a46b){_0x8ec5fc=_0x8ec5fc-0x0;let _0x8d228f=_0x43a4[_0x8ec5fc];return _0x8d228f;};import{cloneDeep as _0x561270}from'lodash-es';export default class j{constructor(_0x1d0788,_0x59dfcb){this['id']=_0x1d0788,this[_0x8d22('0x9')]=_0x59dfcb;}[_0x8d22('0x3')](_0x1f1812,_0x52ff3b){let _0x2ec3d4;for(;_0x52ff3b['length']>0x1&&this['_compareOperations'](_0x52ff3b[0x0],_0x52ff3b[0x1]);)_0x2ec3d4?(_0x2ec3d4=this['_combineNext'](_0x52ff3b[_0x8d22('0x8')](),_0x2ec3d4),_0x1f1812[_0x8d22('0x7')]['push'](0x0)):(_0x2ec3d4=_0x561270(_0x52ff3b[_0x8d22('0x8')]()),_0x1f1812[_0x8d22('0x7')][_0x8d22('0x1')](this['id']));return!!_0x2ec3d4&&(_0x2ec3d4=this[_0x8d22('0x2')](_0x52ff3b[_0x8d22('0x8')](),_0x2ec3d4),_0x1f1812[_0x8d22('0x7')][_0x8d22('0x1')](0x0),_0x1f1812[_0x8d22('0x5')][_0x8d22('0x1')](this['_compressSingleOperation'](_0x2ec3d4)),!0x0);}[_0x8d22('0x6')](_0x25eb82,_0x4d227e){const _0x514ee0=this[_0x8d22('0x0')](_0x4d227e);for(;0x0==_0x4d227e[_0x8d22('0x7')][0x0];)_0x4d227e[_0x8d22('0x7')][_0x8d22('0x8')](),_0x25eb82[_0x8d22('0x1')](this[_0x8d22('0x4')](_0x514ee0));_0x25eb82['push'](_0x514ee0);}}
23
+ const _0x3bbd=['_splitCurrent','_combineNext','_context','types','shift','_compareOperations','_id','compress','buffers','push','_compressSingleOperation'];(function(_0x5e0630,_0x3bbd34){const _0x391287=function(_0x4c1aa1){while(--_0x4c1aa1){_0x5e0630['push'](_0x5e0630['shift']());}};_0x391287(++_0x3bbd34);}(_0x3bbd,0x7c));const _0x3912=function(_0x5e0630,_0x3bbd34){_0x5e0630=_0x5e0630-0x0;let _0x391287=_0x3bbd[_0x5e0630];return _0x391287;};import{cloneDeep as _0x8e954f}from'lodash-es';export default class b{constructor(_0x38ceb0,_0x19bf4){this[_0x3912('0x3')]=_0x38ceb0,this[_0x3912('0xa')]=_0x19bf4;}[_0x3912('0x4')](_0x2570ee,_0x205517){let _0x2dd0c0;for(;_0x205517['length']>0x1&&this[_0x3912('0x2')](_0x205517[0x0],_0x205517[0x1]);)_0x2dd0c0?(_0x2dd0c0=this[_0x3912('0x9')](_0x205517['shift'](),_0x2dd0c0),_0x2570ee[_0x3912('0x0')][_0x3912('0x6')](0x0)):(_0x2dd0c0=_0x8e954f(_0x205517[_0x3912('0x1')]()),_0x2570ee[_0x3912('0x0')][_0x3912('0x6')](this[_0x3912('0x3')]));return!!_0x2dd0c0&&(_0x2dd0c0=this[_0x3912('0x9')](_0x205517['shift'](),_0x2dd0c0),_0x2570ee[_0x3912('0x0')][_0x3912('0x6')](0x0),_0x2570ee[_0x3912('0x5')]['push'](this[_0x3912('0x7')](_0x2dd0c0)),!0x0);}['decompress'](_0x367093,_0x397c5e){const _0x500210=this['_decompressSingleOperation'](_0x397c5e);for(;0x0==_0x397c5e[_0x3912('0x0')][0x0];)_0x397c5e[_0x3912('0x0')][_0x3912('0x1')](),_0x367093[_0x3912('0x6')](this[_0x3912('0x8')](_0x500210));_0x367093['push'](_0x500210);}}
@@ -0,0 +1,24 @@
1
+ import ActionCompressor from './actioncompressor';
2
+ import type { CompressedOperationsData } from '../compressor';
3
+ export default class DeletingActionCompressor extends ActionCompressor {
4
+ /**
5
+ * @inheritDoc
6
+ */
7
+ protected _combineNext(nextOperation: any, combined: any): any;
8
+ /**
9
+ * @inheritDoc
10
+ */
11
+ protected _splitCurrent(combined: any): any;
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _compareOperations(opA: any, opB: any): boolean;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _compressSingleOperation(operation: any): Uint8Array;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ protected _decompressSingleOperation(data: CompressedOperationsData): any;
24
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x21fc=['$graveyard','MoveOperation','root','sourcePosition','compress','_compareOperations','_context','_splitCurrent','targetPosition','_compressSingleOperation','_getCompressorByName','howMany','__className','buffers'];(function(_0x251a79,_0x21fcaa){const _0x2d58ea=function(_0x39ebed){while(--_0x39ebed){_0x251a79['push'](_0x251a79['shift']());}};_0x2d58ea(++_0x21fcaa);}(_0x21fc,0xff));const _0x2d58=function(_0x251a79,_0x21fcaa){_0x251a79=_0x251a79-0x0;let _0x2d58ea=_0x21fc[_0x251a79];return _0x2d58ea;};import _0x2987c0 from'./actioncompressor';import{arePositionsEqual as _0x4424f4,getPositionShiftedBy as _0x19c4aa}from'../utils';import{cloneDeep as _0x150960}from'lodash-es';export default class u extends _0x2987c0{['_combineNext'](_0x540f7b,_0x34d574){return _0x34d574[_0x2d58('0x8')]++,_0x34d574[_0x2d58('0x0')]=_0x150960(_0x540f7b[_0x2d58('0x0')]),_0x34d574;}[_0x2d58('0x4')](_0x5dbb58){const _0x55fa21=_0x150960(_0x5dbb58);return _0x5dbb58[_0x2d58('0x8')]--,_0x55fa21[_0x2d58('0x8')]=0x1,_0x55fa21[_0x2d58('0x0')]=_0x19c4aa(_0x55fa21[_0x2d58('0x0')],_0x5dbb58[_0x2d58('0x8')]),_0x55fa21;}[_0x2d58('0x2')](_0x106053,_0x50baff){return!(!S(_0x106053)||!S(_0x50baff))&&(_0x4424f4(_0x19c4aa(_0x106053[_0x2d58('0x0')],-0x1),_0x50baff[_0x2d58('0x0')])&&_0x4424f4(_0x106053[_0x2d58('0x5')],_0x50baff[_0x2d58('0x5')]));}[_0x2d58('0x6')](_0x458004){const _0x57181c={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x2d58('0x3')][_0x2d58('0x7')](_0x2d58('0xc'))[_0x2d58('0x1')](_0x57181c,[_0x458004]),_0x57181c[_0x2d58('0xa')][0x0];}['_decompressSingleOperation'](_0x53f523){const _0x2e7e37=[];return this['_context'][_0x2d58('0x7')]('MoveOperation')['decompress'](_0x2e7e37,_0x53f523),_0x2e7e37[0x0];}}function S(_0x5c2150){return _0x2d58('0xc')==_0x5c2150[_0x2d58('0x9')]&&_0x2d58('0xb')==_0x5c2150['targetPosition'][_0x2d58('0xd')]&&0x1==_0x5c2150[_0x2d58('0x8')]&&!_0x5c2150['wasUndone'];}
23
+ const _0x2e35=['compress','root','_decompressSingleOperation','sourcePosition','_combineNext','MoveOperation','howMany','wasUndone','__className','buffers','_context','decompress','_checkOperation','targetPosition'];(function(_0x47dd90,_0x2e35ef){const _0x70eaa3=function(_0x911591){while(--_0x911591){_0x47dd90['push'](_0x47dd90['shift']());}};_0x70eaa3(++_0x2e35ef);}(_0x2e35,0x192));const _0x70ea=function(_0x47dd90,_0x2e35ef){_0x47dd90=_0x47dd90-0x0;let _0x70eaa3=_0x2e35[_0x47dd90];return _0x70eaa3;};import _0x1a7134 from'./actioncompressor';import{arePositionsEqual as _0xf942f1,getPositionShiftedBy as _0x1eabe2}from'../utils';import{cloneDeep as _0x26786f}from'lodash-es';export default class c extends _0x1a7134{[_0x70ea('0x8')](_0xeb8d72,_0x365807){return _0x365807[_0x70ea('0xa')]++,_0x365807[_0x70ea('0x7')]=_0x26786f(_0xeb8d72[_0x70ea('0x7')]),_0x365807;}['_splitCurrent'](_0x71ab04){const _0x5426e4=_0x26786f(_0x71ab04);return _0x71ab04['howMany']--,_0x5426e4['howMany']=0x1,_0x5426e4[_0x70ea('0x7')]=_0x1eabe2(_0x5426e4[_0x70ea('0x7')],_0x71ab04[_0x70ea('0xa')]),_0x5426e4;}['_compareOperations'](_0x5e896b,_0x24c2bc){return!(!this['_checkOperation'](_0x5e896b)||!this['_checkOperation'](_0x24c2bc))&&(_0xf942f1(_0x1eabe2(_0x5e896b[_0x70ea('0x7')],-0x1),_0x24c2bc['sourcePosition'])&&_0xf942f1(_0x5e896b['targetPosition'],_0x24c2bc['targetPosition']));}['_compressSingleOperation'](_0x82973e){const _0x39f935={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x70ea('0x0')]['_getCompressorByName']('MoveOperation')[_0x70ea('0x4')](_0x39f935,[_0x82973e]),_0x39f935[_0x70ea('0xd')][0x0];}[_0x70ea('0x6')](_0x40cf6c){const _0x546a7a=[];return this[_0x70ea('0x0')]['_getCompressorByName'](_0x70ea('0x9'))[_0x70ea('0x1')](_0x546a7a,_0x40cf6c),_0x546a7a[0x0];}[_0x70ea('0x2')](_0x10d106){return _0x70ea('0x9')==_0x10d106[_0x70ea('0xc')]&&'$graveyard'==_0x10d106[_0x70ea('0x3')][_0x70ea('0x5')]&&0x1==_0x10d106['howMany']&&!_0x10d106[_0x70ea('0xb')];}}
@@ -0,0 +1,24 @@
1
+ import ActionCompressor from './actioncompressor';
2
+ import type { CompressedOperationsData } from '../compressor';
3
+ export default class ForwardDeletingActionCompressor extends ActionCompressor {
4
+ /**
5
+ * @inheritDoc
6
+ */
7
+ protected _combineNext(nextOperation: any, combined: any): any;
8
+ /**
9
+ * @inheritDoc
10
+ */
11
+ protected _splitCurrent(combined: any): any;
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _compareOperations(opA: any, opB: any): boolean;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _compressSingleOperation(operation: any): Uint8Array;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ protected _decompressSingleOperation(data: CompressedOperationsData): any;
24
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3e43=['_decompressSingleOperation','howMany','_combineNext','decompress','MoveOperation','sourcePosition','_splitCurrent','wasUndone','_compareOperations','_compressSingleOperation','_context','compress','root','buffers','targetPosition','$graveyard'];(function(_0x4d8a09,_0x3e431f){const _0x3e967a=function(_0x2c826b){while(--_0x2c826b){_0x4d8a09['push'](_0x4d8a09['shift']());}};_0x3e967a(++_0x3e431f);}(_0x3e43,0x1aa));const _0x3e96=function(_0x4d8a09,_0x3e431f){_0x4d8a09=_0x4d8a09-0x0;let _0x3e967a=_0x3e43[_0x4d8a09];return _0x3e967a;};import _0x2396a1 from'./actioncompressor';import{arePositionsEqual as _0x4dc739}from'../utils';import{cloneDeep as _0x3ca661}from'lodash-es';export default class l extends _0x2396a1{[_0x3e96('0x8')](_0x1c1678,_0x41633e){return _0x41633e[_0x3e96('0x7')]++,_0x41633e;}[_0x3e96('0xc')](_0x4d79eb){const _0x190660=_0x3ca661(_0x4d79eb);return _0x190660[_0x3e96('0x7')]=0x1,_0x4d79eb[_0x3e96('0x7')]--,_0x190660;}[_0x3e96('0xe')](_0x4c6dd2,_0x45f700){return!(!S(_0x4c6dd2)||!S(_0x45f700))&&(_0x4dc739(_0x4c6dd2[_0x3e96('0xb')],_0x45f700['sourcePosition'])&&_0x4dc739(_0x4c6dd2[_0x3e96('0x4')],_0x45f700[_0x3e96('0x4')]));}[_0x3e96('0xf')](_0x219ea7){const _0x1867a8={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x3e96('0x0')]['_getCompressorByName'](_0x3e96('0xa'))[_0x3e96('0x1')](_0x1867a8,[_0x219ea7]),_0x1867a8[_0x3e96('0x3')][0x0];}[_0x3e96('0x6')](_0x2f6d38){const _0x1c6758=[];return this[_0x3e96('0x0')]['_getCompressorByName'](_0x3e96('0xa'))[_0x3e96('0x9')](_0x1c6758,_0x2f6d38),_0x1c6758[0x0];}}function S(_0x269900){return _0x3e96('0xa')==_0x269900['__className']&&_0x3e96('0x5')==_0x269900[_0x3e96('0x4')][_0x3e96('0x2')]&&0x1==_0x269900[_0x3e96('0x7')]&&!_0x269900[_0x3e96('0xd')];}
23
+ const _0x1a44=['decompress','targetPosition','howMany','_compressSingleOperation','_context','_combineNext','__className','_checkOperation','_getCompressorByName','_compareOperations','buffers','_splitCurrent','$graveyard','sourcePosition','MoveOperation','compress','root'];(function(_0x40e553,_0x1a443a){const _0x48d818=function(_0x356c2f){while(--_0x356c2f){_0x40e553['push'](_0x40e553['shift']());}};_0x48d818(++_0x1a443a);}(_0x1a44,0x174));const _0x48d8=function(_0x40e553,_0x1a443a){_0x40e553=_0x40e553-0x0;let _0x48d818=_0x1a44[_0x40e553];return _0x48d818;};import _0x2b6c7b from'./actioncompressor';import{arePositionsEqual as _0x23c41f}from'../utils';import{cloneDeep as _0x5cb38d}from'lodash-es';export default class h extends _0x2b6c7b{[_0x48d8('0x7')](_0x2a6ce3,_0x13f05e){return _0x13f05e[_0x48d8('0x4')]++,_0x13f05e;}[_0x48d8('0xd')](_0x4e7092){const _0x193e7e=_0x5cb38d(_0x4e7092);return _0x193e7e['howMany']=0x1,_0x4e7092[_0x48d8('0x4')]--,_0x193e7e;}[_0x48d8('0xb')](_0x3cad5d,_0x43f16a){return!(!this['_checkOperation'](_0x3cad5d)||!this[_0x48d8('0x9')](_0x43f16a))&&(_0x23c41f(_0x3cad5d[_0x48d8('0xf')],_0x43f16a[_0x48d8('0xf')])&&_0x23c41f(_0x3cad5d['targetPosition'],_0x43f16a[_0x48d8('0x3')]));}[_0x48d8('0x5')](_0x2ff3b9){const _0x333efc={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x48d8('0x6')][_0x48d8('0xa')](_0x48d8('0x10'))[_0x48d8('0x0')](_0x333efc,[_0x2ff3b9]),_0x333efc[_0x48d8('0xc')][0x0];}['_decompressSingleOperation'](_0x513209){const _0x2a63af=[];return this['_context']['_getCompressorByName']('MoveOperation')[_0x48d8('0x2')](_0x2a63af,_0x513209),_0x2a63af[0x0];}[_0x48d8('0x9')](_0x504b26){return _0x48d8('0x10')==_0x504b26[_0x48d8('0x8')]&&_0x48d8('0xe')==_0x504b26[_0x48d8('0x3')][_0x48d8('0x1')]&&0x1==_0x504b26['howMany']&&!_0x504b26['wasUndone'];}}
@@ -0,0 +1,24 @@
1
+ import ActionCompressor from './actioncompressor';
2
+ import type { CompressedOperationsData } from '../compressor';
3
+ export default class TypingActionCompressor extends ActionCompressor {
4
+ /**
5
+ * @inheritDocs
6
+ */
7
+ protected _combineNext(nextOperation: any, combined: any): any;
8
+ /**
9
+ * @inheritDoc
10
+ */
11
+ protected _splitCurrent(combined: any): any;
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _compareOperations(opA: any, opB: any): boolean;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _compressSingleOperation(operation: any): Uint8Array;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ protected _decompressSingleOperation(data: CompressedOperationsData): any;
24
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x41b6=['data','next','_compressSingleOperation','attributes','decompress','wasUndone','length','_decompressSingleOperation','_getCompressorByName','nodes','value','buffers','_context','InsertOperation','every','_combineNext','position','_compareOperations','keys','substr'];(function(_0x3d1594,_0x41b678){const _0x35f9c2=function(_0x4113d7){while(--_0x4113d7){_0x3d1594['push'](_0x3d1594['shift']());}};_0x35f9c2(++_0x41b678);}(_0x41b6,0x164));const _0x35f9=function(_0x3d1594,_0x41b678){_0x3d1594=_0x3d1594-0x0;let _0x35f9c2=_0x41b6[_0x3d1594];return _0x35f9c2;};import _0x206378 from'./actioncompressor';import{arePositionsEqual as _0xcbe1c4,getPositionShiftedBy as _0x3e82f7}from'../utils';import{cloneDeep as _0x599f86}from'lodash-es';export default class g extends _0x206378{[_0x35f9('0x13')](_0x379fc9,_0x2897fc){return _0x2897fc[_0x35f9('0xd')][0x0][_0x35f9('0x4')]+=_0x379fc9[_0x35f9('0xd')][0x0][_0x35f9('0x4')],_0x2897fc;}['_splitCurrent'](_0x58dfe9){const _0x18696e=_0x599f86(_0x58dfe9),_0x36ceec=_0x18696e[_0x35f9('0xd')][0x0],_0x91430c=_0x58dfe9[_0x35f9('0xd')][0x0],_0xfc8549=_0x91430c['data'][Symbol['iterator']]()[_0x35f9('0x5')]()[_0x35f9('0xe')],_0x51dec6=_0xfc8549[_0x35f9('0xa')];return _0x36ceec[_0x35f9('0x4')]=_0xfc8549,_0x91430c[_0x35f9('0x4')]=_0x91430c[_0x35f9('0x4')][_0x35f9('0x3')](_0x51dec6),_0x58dfe9[_0x35f9('0x0')]=_0x3e82f7(_0x58dfe9[_0x35f9('0x0')],_0x51dec6),_0x18696e;}[_0x35f9('0x1')](_0x3a227d,_0x13c093){if(S(_0x3a227d)&&S(_0x13c093)){const _0x32918c=_0x3a227d['nodes'][0x0][_0x35f9('0x4')][_0x35f9('0xa')],_0xece04d=_0xcbe1c4(_0x3e82f7(_0x3a227d[_0x35f9('0x0')],_0x32918c),_0x13c093[_0x35f9('0x0')]),_0x28d933=_0x3a227d['nodes'][0x0],_0x27b1f5=_0x13c093[_0x35f9('0xd')][0x0];return _0xece04d&&function(_0x1be417,_0x46807a){const _0x40d97f=Object[_0x35f9('0x2')](_0x1be417[_0x35f9('0x7')]||{}),_0x46adef=Object['keys'](_0x46807a['attributes']||{});if(_0x40d97f[_0x35f9('0xa')]!==_0x46adef[_0x35f9('0xa')])return!0x1;return _0x40d97f[_0x35f9('0x12')](_0x4b8e42=>_0x46807a[_0x35f9('0x7')][_0x4b8e42]&&_0x46807a[_0x35f9('0x7')][_0x4b8e42]===_0x1be417[_0x35f9('0x7')][_0x4b8e42]);}(_0x28d933,_0x27b1f5);}return!0x1;}[_0x35f9('0x6')](_0x5682fc){const _0x3d5a11={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x35f9('0x10')][_0x35f9('0xc')]('InsertOperation')['compress'](_0x3d5a11,[_0x5682fc]),_0x3d5a11[_0x35f9('0xf')][0x0];}[_0x35f9('0xb')](_0x51b612){const _0x200e04=[];return this[_0x35f9('0x10')]['_getCompressorByName'](_0x35f9('0x11'))[_0x35f9('0x8')](_0x200e04,_0x51b612),_0x200e04[0x0];}}function S(_0x2bb77a){return _0x35f9('0x11')==_0x2bb77a['__className']&&0x1==_0x2bb77a[_0x35f9('0xd')]['length']&&_0x2bb77a[_0x35f9('0xd')][0x0]['data']&&!_0x2bb77a[_0x35f9('0x9')]&&0x1==Array['from'](_0x2bb77a[_0x35f9('0xd')][0x0][_0x35f9('0x4')])['length'];}
23
+ const _0x1e31=['compress','iterator','value','_context','_compareAttributes','length','keys','wasUndone','data','_splitCurrent','_getCompressorByName','nodes','_compressSingleOperation','__className','_checkOperation','_combineNext','substr','decompress','attributes','InsertOperation','position'];(function(_0xb23211,_0x1e311d){const _0x4c7bbe=function(_0x48485a){while(--_0x48485a){_0xb23211['push'](_0xb23211['shift']());}};_0x4c7bbe(++_0x1e311d);}(_0x1e31,0x92));const _0x4c7b=function(_0xb23211,_0x1e311d){_0xb23211=_0xb23211-0x0;let _0x4c7bbe=_0x1e31[_0xb23211];return _0x4c7bbe;};import _0x556ae1 from'./actioncompressor';import{arePositionsEqual as _0x134ff3,getPositionShiftedBy as _0x1c837e}from'../utils';import{cloneDeep as _0x2ef7f5}from'lodash-es';export default class m extends _0x556ae1{[_0x4c7b('0x10')](_0x6b5c1d,_0x294046){return _0x294046[_0x4c7b('0xc')][0x0][_0x4c7b('0x9')]+=_0x6b5c1d[_0x4c7b('0xc')][0x0]['data'],_0x294046;}[_0x4c7b('0xa')](_0x48a140){const _0x24b11b=_0x2ef7f5(_0x48a140),_0xbc2d6d=_0x24b11b[_0x4c7b('0xc')][0x0],_0x283e9d=_0x48a140[_0x4c7b('0xc')][0x0],_0xe833a9=_0x283e9d[_0x4c7b('0x9')][Symbol[_0x4c7b('0x2')]]()['next']()[_0x4c7b('0x3')],_0x4524c8=_0xe833a9[_0x4c7b('0x6')];return _0xbc2d6d['data']=_0xe833a9,_0x283e9d['data']=_0x283e9d[_0x4c7b('0x9')][_0x4c7b('0x11')](_0x4524c8),_0x48a140['position']=_0x1c837e(_0x48a140['position'],_0x4524c8),_0x24b11b;}['_compareOperations'](_0x520ae2,_0x118406){if(this[_0x4c7b('0xf')](_0x520ae2)&&this['_checkOperation'](_0x118406)){const _0x49335c=_0x520ae2[_0x4c7b('0xc')][0x0][_0x4c7b('0x9')][_0x4c7b('0x6')],_0x4b22f9=_0x134ff3(_0x1c837e(_0x520ae2[_0x4c7b('0x0')],_0x49335c),_0x118406[_0x4c7b('0x0')]),_0xfd8564=_0x520ae2[_0x4c7b('0xc')][0x0],_0xcc9fbd=_0x118406['nodes'][0x0];return _0x4b22f9&&this[_0x4c7b('0x5')](_0xfd8564,_0xcc9fbd);}return!0x1;}[_0x4c7b('0xd')](_0x4fb5ea){const _0x9a1b86={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x4c7b('0x4')][_0x4c7b('0xb')](_0x4c7b('0x14'))[_0x4c7b('0x1')](_0x9a1b86,[_0x4fb5ea]),_0x9a1b86['buffers'][0x0];}['_decompressSingleOperation'](_0x37b174){const _0x589731=[];return this[_0x4c7b('0x4')]['_getCompressorByName'](_0x4c7b('0x14'))[_0x4c7b('0x12')](_0x589731,_0x37b174),_0x589731[0x0];}[_0x4c7b('0xf')](_0x51426e){return _0x4c7b('0x14')==_0x51426e[_0x4c7b('0xe')]&&0x1==_0x51426e['nodes'][_0x4c7b('0x6')]&&_0x51426e[_0x4c7b('0xc')][0x0][_0x4c7b('0x9')]&&!_0x51426e[_0x4c7b('0x8')]&&0x1==Array['from'](_0x51426e['nodes'][0x0]['data'])['length'];}[_0x4c7b('0x5')](_0x183261,_0x19ffcb){const _0x2920e5=Object['keys'](_0x183261[_0x4c7b('0x13')]||{}),_0x435eff=Object[_0x4c7b('0x7')](_0x19ffcb['attributes']||{});return _0x2920e5['length']===_0x435eff[_0x4c7b('0x6')]&&_0x2920e5['every'](_0x2fd995=>_0x19ffcb[_0x4c7b('0x13')][_0x2fd995]&&_0x19ffcb['attributes'][_0x2fd995]===_0x183261['attributes'][_0x2fd995]);}}
@@ -0,0 +1,12 @@
1
+ import ActionCompressor from './actioncompressor';
2
+ import type { CompressedOperationsData } from '../compressor';
3
+ export default class UserSelectionActionCompressor extends ActionCompressor {
4
+ /**
5
+ * @inheritDoc
6
+ */
7
+ compress(result: CompressedOperationsData, operations: Array<any>): boolean;
8
+ /**
9
+ * @inheritDoc
10
+ */
11
+ decompress(result: Array<any>, data: CompressedOperationsData): void;
12
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x46fc=['buffers','_context','MarkerOperation','_compressSingleOperation','__className','toNone','push','decompress','types','end','oldRange','name','startsWith','stickiness','user:','shift','_decompressSingleOperation','start','newRange','compress','_getCompressorByName'];(function(_0x40c028,_0x46fc1f){const _0xe9125c=function(_0x46b2f7){while(--_0x46b2f7){_0x40c028['push'](_0x40c028['shift']());}};_0xe9125c(++_0x46fc1f);}(_0x46fc,0x174));const _0xe912=function(_0x40c028,_0x46fc1f){_0x40c028=_0x40c028-0x0;let _0xe9125c=_0x46fc[_0x40c028];return _0xe9125c;};import _0x5a6b6b from'./actioncompressor';import{arePositionsEqual as _0x5a130d}from'../utils';import{cloneDeep as _0x3eaed0}from'lodash-es';export default class M extends _0x5a6b6b{[_0xe912('0x4')](_0x5f4937,_0x213112){if(!function(_0x19e656,_0x4b753e){if(!_0x19e656||!_0x4b753e)return!0x1;if(_0xe912('0x8')!=_0x19e656[_0xe912('0xa')]||_0xe912('0x8')!=_0x4b753e[_0xe912('0xa')])return!0x1;if(_0x19e656[_0xe912('0x11')][_0xe912('0x12')]('user:')&&_0x4b753e[_0xe912('0x11')][_0xe912('0x12')](_0xe912('0x14'))&&_0x19e656[_0xe912('0x11')]!=_0x4b753e['name'])return!0x0;return!0x1;}(_0x213112[0x0],_0x213112[0x1]))return!0x1;const _0x2c2b43=_0x213112['shift']();return _0x2c2b43[_0xe912('0x10')]=null,_0x2c2b43['newRange']&&_0x5a130d(_0x2c2b43['newRange'][_0xe912('0x2')],_0x2c2b43[_0xe912('0x3')][_0xe912('0xf')])&&(_0x2c2b43[_0xe912('0x3')]['end']=null),_0x213112[_0xe912('0x0')](),_0x5f4937['types'][_0xe912('0xc')](this['id']),_0x5f4937[_0xe912('0xe')]['push'](0x0),_0x5f4937[_0xe912('0x6')][_0xe912('0xc')](this[_0xe912('0x9')](_0x2c2b43)),!0x0;}['decompress'](_0x2ecf8c,_0x3ed6d3){const _0x26b93b=this[_0xe912('0x1')](_0x3ed6d3);_0x26b93b[_0xe912('0x3')]&&!_0x26b93b[_0xe912('0x3')][_0xe912('0xf')]&&(_0x26b93b[_0xe912('0x3')][_0xe912('0xf')]=_0x3eaed0(_0x26b93b[_0xe912('0x3')][_0xe912('0x2')]));const _0x443ccf=_0x3eaed0(_0x26b93b);_0x443ccf[_0xe912('0x3')]&&(_0x443ccf[_0xe912('0x3')][_0xe912('0x2')][_0xe912('0x13')]=_0xe912('0xb'),_0x443ccf['newRange']['end']=_0x3eaed0(_0x443ccf['newRange'][_0xe912('0x2')])),_0x443ccf[_0xe912('0x11')]='user:position:'+_0x443ccf[_0xe912('0x11')]['split'](':')[0x2],_0x3ed6d3[_0xe912('0xe')][_0xe912('0x0')](),_0x2ecf8c[_0xe912('0xc')](_0x26b93b),_0x2ecf8c['push'](_0x443ccf);}[_0xe912('0x9')](_0x391fb4){const _0x1c3ddf={'types':[],'buffers':[],'baseVersion':0x0};return this['_context'][_0xe912('0x5')]('MarkerOperation')[_0xe912('0x4')](_0x1c3ddf,[_0x391fb4]),_0x1c3ddf[_0xe912('0x6')][0x0];}[_0xe912('0x1')](_0x343cdd){const _0x5b54cf=[];return this[_0xe912('0x7')][_0xe912('0x5')](_0xe912('0x8'))[_0xe912('0xd')](_0x5b54cf,_0x343cdd),_0x5b54cf[0x0];}}
23
+ const _0x40d9=['oldRange','user:position:','compress','start','types','shift','_context','buffers','startsWith','_getCompressorByName','decompress','newRange','MarkerOperation','_compressSingleOperation','toNone','name','user:','end','push','_compareOperations','_decompressSingleOperation','split'];(function(_0x5c0e8d,_0x40d940){const _0x5f4933=function(_0x177734){while(--_0x177734){_0x5c0e8d['push'](_0x5c0e8d['shift']());}};_0x5f4933(++_0x40d940);}(_0x40d9,0x7c));const _0x5f49=function(_0x5c0e8d,_0x40d940){_0x5c0e8d=_0x5c0e8d-0x0;let _0x5f4933=_0x40d9[_0x5c0e8d];return _0x5f4933;};import _0x474db7 from'./actioncompressor';import{arePositionsEqual as _0x2abf27}from'../utils';import{cloneDeep as _0x18dc87}from'lodash-es';export default class f extends _0x474db7{[_0x5f49('0xa')](_0x25cb6d,_0x185425){if(!this['_compareOperations'](_0x185425[0x0],_0x185425[0x1]))return!0x1;const _0x24ad56=_0x185425[_0x5f49('0xd')]();return _0x24ad56[_0x5f49('0x8')]=null,_0x24ad56[_0x5f49('0x13')]&&_0x2abf27(_0x24ad56[_0x5f49('0x13')]['start'],_0x24ad56[_0x5f49('0x13')][_0x5f49('0x3')])&&(_0x24ad56[_0x5f49('0x13')]['end']=null),_0x185425[_0x5f49('0xd')](),_0x25cb6d[_0x5f49('0xc')][_0x5f49('0x4')](this['_id']),_0x25cb6d[_0x5f49('0xc')][_0x5f49('0x4')](0x0),_0x25cb6d[_0x5f49('0xf')][_0x5f49('0x4')](this['_compressSingleOperation'](_0x24ad56)),!0x0;}['decompress'](_0x4f6cab,_0x3ce0a0){const _0x15aca6=this[_0x5f49('0x6')](_0x3ce0a0);_0x15aca6[_0x5f49('0x13')]&&!_0x15aca6[_0x5f49('0x13')]['end']&&(_0x15aca6['newRange'][_0x5f49('0x3')]=_0x18dc87(_0x15aca6[_0x5f49('0x13')][_0x5f49('0xb')]));const _0x22f366=_0x18dc87(_0x15aca6);_0x22f366[_0x5f49('0x13')]&&(_0x22f366[_0x5f49('0x13')]['start']['stickiness']=_0x5f49('0x0'),_0x22f366[_0x5f49('0x13')][_0x5f49('0x3')]=_0x18dc87(_0x22f366[_0x5f49('0x13')][_0x5f49('0xb')])),_0x22f366[_0x5f49('0x1')]=_0x5f49('0x9')+_0x22f366[_0x5f49('0x1')][_0x5f49('0x7')](':')[0x2],_0x3ce0a0[_0x5f49('0xc')][_0x5f49('0xd')](),_0x4f6cab['push'](_0x15aca6),_0x4f6cab[_0x5f49('0x4')](_0x22f366);}[_0x5f49('0x15')](_0x56cf33){const _0x21be79={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x5f49('0xe')][_0x5f49('0x11')](_0x5f49('0x14'))[_0x5f49('0xa')](_0x21be79,[_0x56cf33]),_0x21be79['buffers'][0x0];}[_0x5f49('0x6')](_0x149ed0){const _0x1d41cd=[];return this[_0x5f49('0xe')][_0x5f49('0x11')](_0x5f49('0x14'))[_0x5f49('0x12')](_0x1d41cd,_0x149ed0),_0x1d41cd[0x0];}[_0x5f49('0x5')](_0x464c1d,_0x43ae5c){return!(!_0x464c1d||!_0x43ae5c)&&(_0x5f49('0x14')==_0x464c1d['__className']&&_0x5f49('0x14')==_0x43ae5c['__className']&&!(!_0x464c1d['name'][_0x5f49('0x10')](_0x5f49('0x2'))||!_0x43ae5c['name'][_0x5f49('0x10')](_0x5f49('0x2'))||_0x464c1d[_0x5f49('0x1')]==_0x43ae5c[_0x5f49('0x1')]));}}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Compresses and decompresses given set of operations in JSON format to/from the binary format using `Protocol Buffers`.
3
+ */
4
+ export default class Compressor {
5
+ constructor();
6
+ /**
7
+ * Compress given list of operations in JSON format.
8
+ *
9
+ * **Note** It tries to combine typing-like or deleting-like operations into the one buffer.
10
+ * **Note** Input data will be consumed and modified during compression process. If you need untouched data
11
+ * you need to copy it before the compression.
12
+ */
13
+ compress(operations: Array<any>): CompressedOperationsData;
14
+ /**
15
+ * Decompress given data to the list of operations in JSON format.
16
+ *
17
+ * **Note** Input data will be consumed during decompression process. If you need untouched data
18
+ * you need to copy it before the decompression.
19
+ *
20
+ * @param data Compressed operations.
21
+ * @returns List of operations in JSON format.
22
+ */
23
+ decompress(data: CompressedOperationsData): Array<any>;
24
+ }
25
+ /**
26
+ * Compressed operations data.
27
+ */
28
+ export type CompressedOperationsData = {
29
+ /**
30
+ * List of operations compressed to the binary format.
31
+ */
32
+ buffers: Array<Uint8Array>;
33
+ /**
34
+ * List of compressor identifiers. According to this types a proper compressor will be used for the decompression.
35
+ */
36
+ types: Array<number>;
37
+ /**
38
+ * Base version of the first compressed operation.
39
+ */
40
+ baseVersion: number;
41
+ };
package/src/compressor.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5301=['RootAttributeOperation','registerDescriptor','_compressorById','baseVersion','_registerActionCompressor','Position','SuggestionMarkerOperation','RenameOperation','_registerOperationCompressor','UserSelectionAction','MoveOperation','get','AttributeOperation','description','compress','__className','DeletingAction','length','TypingAction','_getCompressorByName','decompress','comment','build','types','suggestion','Element','_protobufFactory','SplitOperation','set','MarkerOperation','_registerCompressor','_compressorByName','no-operations-provided','InsertOperation','CommentMarkerOperation','forEach','ForwardDeletingAction'];(function(_0x3d63bc,_0x530159){const _0x3f54bd=function(_0x311ead){while(--_0x311ead){_0x3d63bc['push'](_0x3d63bc['shift']());}};_0x3f54bd(++_0x530159);}(_0x5301,0x166));const _0x3f54=function(_0x3d63bc,_0x530159){_0x3d63bc=_0x3d63bc-0x0;let _0x3f54bd=_0x5301[_0x3d63bc];return _0x3f54bd;};import{CKEditorError as _0x6bfd9}from'ckeditor5/src/utils';import _0x157700 from'./protobuffactory';import _0x4a5eac from'./commondescriptions';import _0x40c536 from'./operationcompressor/attributeoperationcompressor';import _0x3e961f from'./operationcompressor/insertoperationcompressor';import _0x55e58e from'./operationcompressor/markeroperationcompressor';import _0x29e900 from'./operationcompressor/mergeoperationcompressor';import _0x555d38 from'./operationcompressor/moveoperationcompressor';import _0x20e012 from'./operationcompressor/renameoperationcompressor';import _0x523068 from'./operationcompressor/rootattributeoperationcompressor';import _0x16d3e4 from'./operationcompressor/splitoperationcompressor';import _0x38c9d9 from'./operationcompressor/nooperationcompressor';import _0x50d6e9 from'./operationcompressor/annotationmarkeroperationcompressor';import _0x22b408 from'./actioncompressor/typingactioncompressor';import _0x258c0d from'./actioncompressor/deletingactioncompressor';import _0x4adc5f from'./actioncompressor/forwarddeletingactioncompressor';import _0x3229c0 from'./actioncompressor/userselectionactioncompressor';export default class w{constructor(){this['_compressorById']=new Map(),this[_0x3f54('0x6')]=new Map(),this['_protobufFactory']=new _0x157700(),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0x11'),_0x4a5eac[_0x3f54('0x11')]),this['_protobufFactory']['registerDescriptor']('Range',_0x4a5eac['Range']),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0x0'),_0x4a5eac[_0x3f54('0x0')]),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0x18'),_0x40c536[_0x3f54('0x19')]),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0x8'),_0x3e961f['description']),this['_protobufFactory'][_0x3f54('0xd')](_0x3f54('0x4'),_0x55e58e[_0x3f54('0x19')]),this[_0x3f54('0x1')]['registerDescriptor']('MergeOperation',_0x29e900[_0x3f54('0x19')]),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0x16'),_0x555d38['description']),this['_protobufFactory'][_0x3f54('0xd')](_0x3f54('0x13'),_0x20e012['description']),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0xc'),_0x523068[_0x3f54('0x19')]),this[_0x3f54('0x1')][_0x3f54('0xd')](_0x3f54('0x2'),_0x16d3e4[_0x3f54('0x19')]),this['_protobufFactory'][_0x3f54('0x22')](),this[_0x3f54('0x5')](0x1,'NoOperation',new _0x38c9d9(0x1,'NoOperation')),this[_0x3f54('0x14')](0xa,_0x3f54('0x18'),_0x40c536),this[_0x3f54('0x14')](0xb,_0x3f54('0x8'),_0x3e961f),this[_0x3f54('0x14')](0xc,_0x3f54('0x4'),_0x55e58e),this[_0x3f54('0x14')](0xd,'MergeOperation',_0x29e900),this[_0x3f54('0x14')](0xe,_0x3f54('0x16'),_0x555d38),this[_0x3f54('0x14')](0xf,'RenameOperation',_0x20e012),this[_0x3f54('0x14')](0x10,_0x3f54('0xc'),_0x523068),this['_registerOperationCompressor'](0x11,_0x3f54('0x2'),_0x16d3e4);const _0x89bb4c=this[_0x3f54('0x1')]['getDescriptor'](_0x3f54('0x4'));this[_0x3f54('0x5')](0x12,_0x3f54('0x9'),new _0x50d6e9(0x12,_0x3f54('0x4'),_0x89bb4c,_0x3f54('0x21'))),this[_0x3f54('0x5')](0x13,_0x3f54('0x12'),new _0x50d6e9(0x13,_0x3f54('0x4'),_0x89bb4c,_0x3f54('0x24'))),this[_0x3f54('0x10')](0x64,_0x3f54('0x1e'),_0x22b408),this[_0x3f54('0x10')](0x65,'DeletingAction',_0x258c0d),this[_0x3f54('0x10')](0x66,'ForwardDeletingAction',_0x4adc5f),this[_0x3f54('0x10')](0x67,'UserSelectionAction',_0x3229c0);}[_0x3f54('0x14')](_0x7edeb5,_0x2a5ab1,_0x2b71f0){const _0x2453e2=new _0x2b71f0(_0x7edeb5,_0x2a5ab1,this[_0x3f54('0x1')]['getDescriptor'](_0x2a5ab1));this[_0x3f54('0x5')](_0x7edeb5,_0x2a5ab1,_0x2453e2);}['_registerActionCompressor'](_0x8a02d6,_0x445d7a,_0x50eb10){const _0x59aec2=new _0x50eb10(_0x8a02d6,this);this['_registerCompressor'](_0x8a02d6,_0x445d7a,_0x59aec2);}[_0x3f54('0x5')](_0x432498,_0x24bbfb,_0x1f7712){this[_0x3f54('0xe')]['set'](_0x432498,_0x1f7712),this[_0x3f54('0x6')][_0x3f54('0x3')](_0x24bbfb,_0x1f7712);}[_0x3f54('0x1f')](_0x1ab307){return this[_0x3f54('0x6')]['get'](_0x1ab307);}['compress'](_0x5863b2){if(!_0x5863b2||!_0x5863b2[0x0])throw new _0x6bfd9(_0x3f54('0x7'),this);const _0x2beba9={'types':[],'buffers':[],'baseVersion':_0x5863b2[0x0][_0x3f54('0xf')]};for(;_0x5863b2[_0x3f54('0x1d')];)this['_getCompressorByName'](_0x3f54('0x15'))[_0x3f54('0x1a')](_0x2beba9,_0x5863b2)||this[_0x3f54('0x1f')]('TypingAction')[_0x3f54('0x1a')](_0x2beba9,_0x5863b2)||this[_0x3f54('0x1f')](_0x3f54('0x1c'))[_0x3f54('0x1a')](_0x2beba9,_0x5863b2)||this[_0x3f54('0x1f')](_0x3f54('0xb'))[_0x3f54('0x1a')](_0x2beba9,_0x5863b2)||this[_0x3f54('0x1f')](_0x3f54('0x9'))[_0x3f54('0x1a')](_0x2beba9,_0x5863b2)||this[_0x3f54('0x1f')](_0x3f54('0x12'))[_0x3f54('0x1a')](_0x2beba9,_0x5863b2)||this[_0x3f54('0x1f')](_0x5863b2[0x0][_0x3f54('0x1b')])[_0x3f54('0x1a')](_0x2beba9,_0x5863b2);return _0x2beba9;}[_0x3f54('0x20')](_0x5b1bd7){const _0x1e03e0=[];for(;_0x5b1bd7[_0x3f54('0x23')][_0x3f54('0x1d')];){this[_0x3f54('0xe')][_0x3f54('0x17')](_0x5b1bd7[_0x3f54('0x23')][0x0])[_0x3f54('0x20')](_0x1e03e0,_0x5b1bd7);}return _0x1e03e0[_0x3f54('0xa')]((_0x10a2cc,_0x24def8)=>_0x10a2cc[_0x3f54('0xf')]=_0x5b1bd7['baseVersion']+_0x24def8),_0x1e03e0;}}
23
+ const _0x4b6f=['no-operations-provided','RenameOperation','__className','InsertOperation','MoveOperation','types','MergeOperation','set','forEach','baseVersion','ForwardDeletingAction','_registerOperationCompressor','getDescriptor','SuggestionMarkerOperation','get','decompress','CommentMarkerOperation','_registerCompressor','_compressorById','compress','_registerActionCompressor','length','_compressorByName','RootOperation','UserSelectionAction','RootAttributeOperation','MarkerOperation','SplitOperation','DeletingAction','_getCompressorByName','NoOperation','_protobufFactory'];(function(_0x45777b,_0x4b6fc7){const _0x207ba9=function(_0xaab6a0){while(--_0xaab6a0){_0x45777b['push'](_0x45777b['shift']());}};_0x207ba9(++_0x4b6fc7);}(_0x4b6f,0x188));const _0x207b=function(_0x45777b,_0x4b6fc7){_0x45777b=_0x45777b-0x0;let _0x207ba9=_0x4b6f[_0x45777b];return _0x207ba9;};import{CKEditorError as _0x2ded25}from'ckeditor5/src/utils';import _0x14ecb1 from'./protobuffactory';import _0x404e7f from'./operationcompressor/operationcompressor';import _0x5c36b1 from'./operationcompressor/attributeoperationcompressor';import _0x4df0db from'./operationcompressor/insertoperationcompressor';import _0x3d2f26 from'./operationcompressor/markeroperationcompressor';import _0x2b0bf6 from'./operationcompressor/nooperationcompressor';import _0x168c23 from'./operationcompressor/annotationmarkeroperationcompressor';import _0x336756 from'./actioncompressor/typingactioncompressor';import _0x5662b1 from'./actioncompressor/deletingactioncompressor';import _0x2cedd0 from'./actioncompressor/forwarddeletingactioncompressor';import _0x39bdab from'./actioncompressor/userselectionactioncompressor';export default class g{constructor(){this[_0x207b('0xa')]=new Map(),this['_compressorByName']=new Map(),this['_protobufFactory']=new _0x14ecb1();const _0x4d6be9=this[_0x207b('0x17')][_0x207b('0x4')]('MarkerOperation');this['_registerCompressor'](0x1,'NoOperation',new _0x2b0bf6(0x1,_0x207b('0x16'),void 0x0)),this[_0x207b('0x3')](0xa,'AttributeOperation',_0x5c36b1),this[_0x207b('0x3')](0xb,_0x207b('0x1b'),_0x4df0db),this[_0x207b('0x3')](0xc,'MarkerOperation',_0x3d2f26),this[_0x207b('0x3')](0xd,_0x207b('0x1e'),_0x404e7f),this[_0x207b('0x3')](0xe,_0x207b('0x1c'),_0x404e7f),this[_0x207b('0x3')](0xf,_0x207b('0x19'),_0x404e7f),this[_0x207b('0x3')](0x10,_0x207b('0x11'),_0x5c36b1),this[_0x207b('0x3')](0x11,_0x207b('0x13'),_0x404e7f),this[_0x207b('0x9')](0x12,_0x207b('0x8'),new _0x168c23(0x12,_0x207b('0x12'),_0x4d6be9,'comment')),this[_0x207b('0x9')](0x13,_0x207b('0x5'),new _0x168c23(0x13,'MarkerOperation',_0x4d6be9,'suggestion')),this[_0x207b('0x3')](0x14,_0x207b('0xf'),_0x404e7f),this[_0x207b('0xc')](0x64,'TypingAction',_0x336756),this['_registerActionCompressor'](0x65,_0x207b('0x14'),_0x5662b1),this[_0x207b('0xc')](0x66,'ForwardDeletingAction',_0x2cedd0),this[_0x207b('0xc')](0x67,_0x207b('0x10'),_0x39bdab);}[_0x207b('0xb')](_0x3d71aa){if(!_0x3d71aa||!_0x3d71aa[0x0])throw new _0x2ded25(_0x207b('0x18'),this);const _0x496d97={'types':[],'buffers':[],'baseVersion':_0x3d71aa[0x0][_0x207b('0x1')]};for(;_0x3d71aa[_0x207b('0xd')];)this[_0x207b('0x15')](_0x207b('0x10'))[_0x207b('0xb')](_0x496d97,_0x3d71aa)||this[_0x207b('0x15')]('TypingAction')[_0x207b('0xb')](_0x496d97,_0x3d71aa)||this[_0x207b('0x15')](_0x207b('0x14'))[_0x207b('0xb')](_0x496d97,_0x3d71aa)||this[_0x207b('0x15')](_0x207b('0x2'))[_0x207b('0xb')](_0x496d97,_0x3d71aa)||this[_0x207b('0x15')](_0x207b('0x8'))[_0x207b('0xb')](_0x496d97,_0x3d71aa)||this[_0x207b('0x15')](_0x207b('0x5'))[_0x207b('0xb')](_0x496d97,_0x3d71aa)||this['_getCompressorByName'](_0x3d71aa[0x0][_0x207b('0x1a')])[_0x207b('0xb')](_0x496d97,_0x3d71aa);return _0x496d97;}['decompress'](_0x4c743c){const _0xc1f1c7=[];for(;_0x4c743c[_0x207b('0x1d')][_0x207b('0xd')];){this[_0x207b('0xa')][_0x207b('0x6')](_0x4c743c[_0x207b('0x1d')][0x0])[_0x207b('0x7')](_0xc1f1c7,_0x4c743c);}return _0xc1f1c7[_0x207b('0x0')]((_0x4454fe,_0x19b0f6)=>_0x4454fe['baseVersion']=_0x4c743c[_0x207b('0x1')]+_0x19b0f6),_0xc1f1c7;}['_getCompressorByName'](_0x30e92e){return this['_compressorByName']['get'](_0x30e92e);}[_0x207b('0x3')](_0x5089f3,_0x5b46c2,_0xa9694){const _0x55b111=new _0xa9694(_0x5089f3,_0x5b46c2,this[_0x207b('0x17')][_0x207b('0x4')](_0x5b46c2));this['_registerCompressor'](_0x5089f3,_0x5b46c2,_0x55b111);}['_registerActionCompressor'](_0xed483a,_0x5a7d0c,_0x5d60f7){const _0x328d0a=new _0x5d60f7(_0xed483a,this);this[_0x207b('0x9')](_0xed483a,_0x5a7d0c,_0x328d0a);}[_0x207b('0x9')](_0x3d2cb9,_0x42564f,_0x12b2ca){this['_compressorById']['set'](_0x3d2cb9,_0x12b2ca),this[_0x207b('0xe')][_0x207b('0x1f')](_0x42564f,_0x12b2ca);}}