@ckeditor/ckeditor5-operations-compressor 0.0.0-internal-20241017.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.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +26 -0
- package/README.md +35 -0
- package/dist/actioncompressor/actioncompressor.d.ts +64 -0
- package/dist/actioncompressor/deletingactioncompressor.d.ts +32 -0
- package/dist/actioncompressor/forwarddeletingactioncompressor.d.ts +32 -0
- package/dist/actioncompressor/typingactioncompressor.d.ts +32 -0
- package/dist/actioncompressor/userselectionactioncompressor.d.ts +20 -0
- package/dist/compressor.d.ts +49 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +24 -0
- package/dist/operationcompressor/annotationmarkeroperationcompressor.d.ts +26 -0
- package/dist/operationcompressor/attributeoperationcompressor.d.ts +21 -0
- package/dist/operationcompressor/insertoperationcompressor.d.ts +21 -0
- package/dist/operationcompressor/markeroperationcompressor.d.ts +17 -0
- package/dist/operationcompressor/nooperationcompressor.d.ts +24 -0
- package/dist/operationcompressor/operationcompressor.d.ts +32 -0
- package/dist/protobuffactory.d.ts +9 -0
- package/dist/utils.d.ts +34 -0
- package/package.json +48 -0
- package/src/actioncompressor/actioncompressor.d.ts +60 -0
- package/src/actioncompressor/actioncompressor.js +23 -0
- package/src/actioncompressor/deletingactioncompressor.d.ts +28 -0
- package/src/actioncompressor/deletingactioncompressor.js +23 -0
- package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +28 -0
- package/src/actioncompressor/forwarddeletingactioncompressor.js +23 -0
- package/src/actioncompressor/typingactioncompressor.d.ts +28 -0
- package/src/actioncompressor/typingactioncompressor.js +23 -0
- package/src/actioncompressor/userselectionactioncompressor.d.ts +16 -0
- package/src/actioncompressor/userselectionactioncompressor.js +23 -0
- package/src/compressor.d.ts +45 -0
- package/src/compressor.js +23 -0
- package/src/index.d.ts +5 -0
- package/src/index.js +23 -0
- package/src/lib/compiledmessages.d.ts +1 -0
- package/src/lib/compiledmessages.js +24 -0
- package/src/lib/protobufdescriptions.js +23 -0
- package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +22 -0
- package/src/operationcompressor/annotationmarkeroperationcompressor.js +23 -0
- package/src/operationcompressor/attributeoperationcompressor.d.ts +17 -0
- package/src/operationcompressor/attributeoperationcompressor.js +23 -0
- package/src/operationcompressor/insertoperationcompressor.d.ts +17 -0
- package/src/operationcompressor/insertoperationcompressor.js +23 -0
- package/src/operationcompressor/markeroperationcompressor.d.ts +13 -0
- package/src/operationcompressor/markeroperationcompressor.js +23 -0
- package/src/operationcompressor/nooperationcompressor.d.ts +20 -0
- package/src/operationcompressor/nooperationcompressor.js +23 -0
- package/src/operationcompressor/operationcompressor.d.ts +28 -0
- package/src/operationcompressor/operationcompressor.js +23 -0
- package/src/protobuffactory.d.ts +5 -0
- package/src/protobuffactory.js +23 -0
- package/src/utils.d.ts +30 -0
- package/src/utils.js +23 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import MarkerOperationCompressor from './markeroperationcompressor.js';
|
|
10
|
+
import type { ProtobufDescriptor } from '../protobuffactory.js';
|
|
11
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
12
|
+
import type { MarkerOperation } from 'ckeditor5/src/engine.js';
|
|
13
|
+
export default class AnnotationMarkerOperationCompressor extends MarkerOperationCompressor {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor(id: number, name: string, descriptor: ProtobufDescriptor, namespaceToOmit: string);
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
compress(result: CompressedOperationsData, operations: Array<MarkerOperation>): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { AttributeOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
export default class AttributeOperationCompressor extends OperationCompressor {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
compress(result: CompressedOperationsData, operations: Array<AttributeOperation>): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
decompress(result: Array<AttributeOperation>, data: CompressedOperationsData): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { InsertOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
export default class InsertOperationCompressor extends OperationCompressor {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { MarkerOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
export default class MarkerOperationCompressor extends OperationCompressor {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { Operation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
/**
|
|
13
|
+
* @extends OperationCompressor
|
|
14
|
+
*/
|
|
15
|
+
export default class NoOperationCompressor extends OperationCompressor {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
10
|
+
import type { ProtobufDescriptor } from '../protobuffactory.js';
|
|
11
|
+
import type { Operation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
/**
|
|
13
|
+
* Compresses and decompresses single operation to the binary format.
|
|
14
|
+
*/
|
|
15
|
+
export default class OperationCompressor {
|
|
16
|
+
constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
|
|
17
|
+
/**
|
|
18
|
+
* Serializes and consumes the first operation from the list.
|
|
19
|
+
*
|
|
20
|
+
* @param result Object to which compression result will be added.
|
|
21
|
+
* @param operations List of operations to compress. The first one will be compressed
|
|
22
|
+
* and removed from the list.
|
|
23
|
+
*/
|
|
24
|
+
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Deserializes and consumes buffered operation.
|
|
27
|
+
*
|
|
28
|
+
* @param result Decompressed operation.
|
|
29
|
+
* @param data Data to decompress.
|
|
30
|
+
*/
|
|
31
|
+
decompress(result: Array<Operation>, data: CompressedOperationsData): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Return new position in JSON format shifted by given offset.
|
|
11
|
+
*
|
|
12
|
+
* @param positionJSON Position serialized to JSON.
|
|
13
|
+
* @param shift Offset shift. Can be a negative value.
|
|
14
|
+
* @returns New position in JSON format.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether one position serialized to JSON is equal to other position serialized to JSON.
|
|
19
|
+
*/
|
|
20
|
+
export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* For the better compression result one of the two common roots (`main` or `$graveyard`)
|
|
23
|
+
* is compressed to the `Boolean` format.
|
|
24
|
+
*
|
|
25
|
+
* Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
|
|
26
|
+
* so we need to find and format all positions in the operation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parsePositionBeforeCompression(operation: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* Position reformatting after decompression.
|
|
31
|
+
*
|
|
32
|
+
* @see {parsePositionBeforeCompression}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parsePositionAfterCompression(operation: any): void;
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ckeditor/ckeditor5-operations-compressor",
|
|
3
|
+
"version": "0.0.0-internal-20241017.0",
|
|
4
|
+
"description": "CKEditor 5 operations compressor for real-time collaboration.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
|
+
"homepage": "https://ckeditor.com/collaboration/real-time/",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"CKEditor",
|
|
9
|
+
"ckeditor5",
|
|
10
|
+
"ckeditor 5",
|
|
11
|
+
"WYSIWYG",
|
|
12
|
+
"WYSIWYW",
|
|
13
|
+
"text",
|
|
14
|
+
"rich-text",
|
|
15
|
+
"richtext",
|
|
16
|
+
"ckeditor",
|
|
17
|
+
"editor",
|
|
18
|
+
"editing",
|
|
19
|
+
"html",
|
|
20
|
+
"operational transformation",
|
|
21
|
+
"ot",
|
|
22
|
+
"collaboration",
|
|
23
|
+
"collaborative",
|
|
24
|
+
"real-time",
|
|
25
|
+
"realtime",
|
|
26
|
+
"framework"
|
|
27
|
+
],
|
|
28
|
+
"author": "CKSource (http://cksource.com/)",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://support.ckeditor.com/hc/en-us/requests/new"
|
|
31
|
+
},
|
|
32
|
+
"type": "module",
|
|
33
|
+
"main": "src/index.js",
|
|
34
|
+
"types": "src/index.d.ts",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-internal-20241017.0",
|
|
37
|
+
"ckeditor5": "0.0.0-internal-20241017.0",
|
|
38
|
+
"lodash-es": "4.17.21",
|
|
39
|
+
"protobufjs": "7.4.0"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"src/**/*.js",
|
|
44
|
+
"src/**/*.d.ts",
|
|
45
|
+
"CHANGELOG.md"
|
|
46
|
+
],
|
|
47
|
+
"obfuscated": true
|
|
48
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { CompressedOperationsData, default as Compressor } from '../compressor.js';
|
|
6
|
+
/**
|
|
7
|
+
* * Compresses and decompresses multiple operations into the one buffer.
|
|
8
|
+
*/
|
|
9
|
+
export default abstract class ActionCompressor {
|
|
10
|
+
constructor(id: number, context: Compressor);
|
|
11
|
+
/**
|
|
12
|
+
* Combines and compress operations from the list.
|
|
13
|
+
* Operations are consumed as long as match this compressor.
|
|
14
|
+
*
|
|
15
|
+
* @param result Object to which compression result should be added.
|
|
16
|
+
* @param operations List of operations in JSON format to compress.
|
|
17
|
+
* @returns `true` when operation is consumed `false` otherwise.
|
|
18
|
+
*/
|
|
19
|
+
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Decompress and split compressed operations. Decompressed operations are consumed (removed from the input data).
|
|
22
|
+
*
|
|
23
|
+
* @param result Decompressed operations in JSON format.
|
|
24
|
+
* @param data Compressed operations data.
|
|
25
|
+
*/
|
|
26
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
27
|
+
/**
|
|
28
|
+
* Compresses single operation using a proper compressor.
|
|
29
|
+
*
|
|
30
|
+
* @param operation Operation in JSON format.
|
|
31
|
+
* @returns Operation JSON compressed to the binary format.
|
|
32
|
+
*/
|
|
33
|
+
protected abstract _compressSingleOperation(operation: any): Uint8Array;
|
|
34
|
+
/**
|
|
35
|
+
* Decompresses combined operation using a proper compressor.
|
|
36
|
+
*
|
|
37
|
+
* @param data Data to compress.
|
|
38
|
+
* @returns Decompressed operation in JSON format.
|
|
39
|
+
*/
|
|
40
|
+
protected abstract _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
41
|
+
/**
|
|
42
|
+
* Combine next operation into the combined one.
|
|
43
|
+
*
|
|
44
|
+
* @param nextOperation Operation to combine in JSON format.
|
|
45
|
+
* @param combined Combined operation in JSON format.
|
|
46
|
+
* @returns Combined operation in JSON format.
|
|
47
|
+
*/
|
|
48
|
+
protected abstract _combineNext(nextOperation: any, combined: any): any;
|
|
49
|
+
/**
|
|
50
|
+
* Split operation from combined one.
|
|
51
|
+
*
|
|
52
|
+
* @param combined Combined operation in JSON format.
|
|
53
|
+
* @returns Split operation in JSON format.
|
|
54
|
+
*/
|
|
55
|
+
protected abstract _splitCurrent(combined: any): any;
|
|
56
|
+
/**
|
|
57
|
+
* Checks if two operations can be combined.
|
|
58
|
+
*/
|
|
59
|
+
protected abstract _compareOperations(opA: any, opB: any): boolean;
|
|
60
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x3c29(){const _0x34dcd1=['_compressSingleOperation','32FQHdCm','1252978VAOHBo','3291820QNzAxq','1533501aaNLXj','push','22dZNExi','_compareOperations','buffers','types','length','_splitCurrent','compress','4458kbsCix','shift','_combineNext','3IEKPgC','505049NFKQGn','_decompressSingleOperation','2508676imGgFz','5irohpe','_context','decompress','29947488Jgwnpm','_id','3241qRsEpb'];_0x3c29=function(){return _0x34dcd1;};return _0x3c29();}const _0x2cd2e2=_0x5392;(function(_0x2129e3,_0x7d56c){const _0x50fc9f=_0x5392,_0x1fa1f9=_0x2129e3();while(!![]){try{const _0x2a35d6=-parseInt(_0x50fc9f(0xf4))/0x1+parseInt(_0x50fc9f(0xff))/0x2*(-parseInt(_0x50fc9f(0x10d))/0x3)+parseInt(_0x50fc9f(0xf6))/0x4*(-parseInt(_0x50fc9f(0xf7))/0x5)+-parseInt(_0x50fc9f(0x10a))/0x6*(parseInt(_0x50fc9f(0xfc))/0x7)+parseInt(_0x50fc9f(0xfe))/0x8*(parseInt(_0x50fc9f(0x101))/0x9)+-parseInt(_0x50fc9f(0x100))/0xa*(parseInt(_0x50fc9f(0x103))/0xb)+parseInt(_0x50fc9f(0xfa))/0xc;if(_0x2a35d6===_0x7d56c)break;else _0x1fa1f9['push'](_0x1fa1f9['shift']());}catch(_0x35335e){_0x1fa1f9['push'](_0x1fa1f9['shift']());}}}(_0x3c29,0x65964));function _0x5392(_0x353342,_0x23713f){const _0x3c29f7=_0x3c29();return _0x5392=function(_0x5392bc,_0x32c8ae){_0x5392bc=_0x5392bc-0xf4;let _0x412395=_0x3c29f7[_0x5392bc];return _0x412395;},_0x5392(_0x353342,_0x23713f);}import{cloneDeep as _0x4c0f94}from'lodash-es';export default class b{constructor(_0xe924b1,_0x28d30d){const _0x2f6f79=_0x5392;this[_0x2f6f79(0xfb)]=_0xe924b1,this[_0x2f6f79(0xf8)]=_0x28d30d;}[_0x2cd2e2(0x109)](_0x5f24fb,_0x3c7043){const _0x3ca227=_0x2cd2e2;let _0x2c0e02;for(;_0x3c7043[_0x3ca227(0x107)]>0x1&&this[_0x3ca227(0x104)](_0x3c7043[0x0],_0x3c7043[0x1]);)_0x2c0e02?(_0x2c0e02=this[_0x3ca227(0x10c)](_0x3c7043[_0x3ca227(0x10b)](),_0x2c0e02),_0x5f24fb[_0x3ca227(0x106)][_0x3ca227(0x102)](0x0)):(_0x2c0e02=_0x4c0f94(_0x3c7043[_0x3ca227(0x10b)]()),_0x5f24fb[_0x3ca227(0x106)][_0x3ca227(0x102)](this[_0x3ca227(0xfb)]));return!!_0x2c0e02&&(_0x2c0e02=this[_0x3ca227(0x10c)](_0x3c7043[_0x3ca227(0x10b)](),_0x2c0e02),_0x5f24fb[_0x3ca227(0x106)][_0x3ca227(0x102)](0x0),_0x5f24fb[_0x3ca227(0x105)][_0x3ca227(0x102)](this[_0x3ca227(0xfd)](_0x2c0e02)),!0x0);}[_0x2cd2e2(0xf9)](_0x20a146,_0x1ae38d){const _0x52707e=_0x2cd2e2,_0x5b5ef5=this[_0x52707e(0xf5)](_0x1ae38d);for(;0x0==_0x1ae38d[_0x52707e(0x106)][0x0];)_0x1ae38d[_0x52707e(0x106)][_0x52707e(0x10b)](),_0x20a146[_0x52707e(0x102)](this[_0x52707e(0x108)](_0x5b5ef5));_0x20a146[_0x52707e(0x102)](_0x5b5ef5);}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
|
+
export default class DeletingActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _splitCurrent(combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x4e5b61=_0x4e22;function _0x4e22(_0x3b67c5,_0x530227){const _0x462cfe=_0x462c();return _0x4e22=function(_0x4e2224,_0x4e81ec){_0x4e2224=_0x4e2224-0x13c;let _0x4d8c50=_0x462cfe[_0x4e2224];return _0x4d8c50;},_0x4e22(_0x3b67c5,_0x530227);}(function(_0x505a4d,_0x35e9dd){const _0x7a66a4=_0x4e22,_0x23aeee=_0x505a4d();while(!![]){try{const _0xb6d374=-parseInt(_0x7a66a4(0x149))/0x1*(-parseInt(_0x7a66a4(0x146))/0x2)+-parseInt(_0x7a66a4(0x13f))/0x3+parseInt(_0x7a66a4(0x150))/0x4*(-parseInt(_0x7a66a4(0x140))/0x5)+parseInt(_0x7a66a4(0x156))/0x6*(parseInt(_0x7a66a4(0x141))/0x7)+-parseInt(_0x7a66a4(0x152))/0x8+parseInt(_0x7a66a4(0x145))/0x9*(parseInt(_0x7a66a4(0x14c))/0xa)+-parseInt(_0x7a66a4(0x159))/0xb;if(_0xb6d374===_0x35e9dd)break;else _0x23aeee['push'](_0x23aeee['shift']());}catch(_0x496e10){_0x23aeee['push'](_0x23aeee['shift']());}}}(_0x462c,0xe5986));import _0x466b75 from'./actioncompressor.js';function _0x462c(){const _0xbcdab9=['_context','_checkOperation','38853cqNIEe','34AiKfSa','__className','_splitCurrent','97122iihrgg','compress','_getCompressorByName','930YsXcmy','buffers','decompress','wasUndone','28wPivsO','targetPosition','3096224GRjXZc','root','howMany','_compareOperations','1609014MeeZir','_compressSingleOperation','MoveOperation','4359454VCWjJY','_decompressSingleOperation','sourcePosition','$graveyard','248493ybBlPv','367235qcWdAy','7aVFPeJ','_combineNext'];_0x462c=function(){return _0xbcdab9;};return _0x462c();}import{arePositionsEqual as _0x29afd0,getPositionShiftedBy as _0x30035a}from'../utils.js';import{cloneDeep as _0x454cfc}from'lodash-es';export default class c extends _0x466b75{[_0x4e5b61(0x142)](_0x200b5f,_0x3313d5){const _0x120cef=_0x4e5b61;return _0x3313d5[_0x120cef(0x154)]++,_0x3313d5[_0x120cef(0x13d)]=_0x454cfc(_0x200b5f[_0x120cef(0x13d)]),_0x3313d5;}[_0x4e5b61(0x148)](_0x44875b){const _0x57c525=_0x4e5b61,_0x3982f7=_0x454cfc(_0x44875b);return _0x44875b[_0x57c525(0x154)]--,_0x3982f7[_0x57c525(0x154)]=0x1,_0x3982f7[_0x57c525(0x13d)]=_0x30035a(_0x3982f7[_0x57c525(0x13d)],_0x44875b[_0x57c525(0x154)]),_0x3982f7;}[_0x4e5b61(0x155)](_0x1f28a9,_0x10250a){const _0x38b4ee=_0x4e5b61;return!(!this[_0x38b4ee(0x144)](_0x1f28a9)||!this[_0x38b4ee(0x144)](_0x10250a))&&(_0x29afd0(_0x30035a(_0x1f28a9[_0x38b4ee(0x13d)],-0x1),_0x10250a[_0x38b4ee(0x13d)])&&_0x29afd0(_0x1f28a9[_0x38b4ee(0x151)],_0x10250a[_0x38b4ee(0x151)]));}[_0x4e5b61(0x157)](_0x26ed62){const _0x5e87be=_0x4e5b61,_0x2ea9bf={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x5e87be(0x143)][_0x5e87be(0x14b)](_0x5e87be(0x158))[_0x5e87be(0x14a)](_0x2ea9bf,[_0x26ed62]),_0x2ea9bf[_0x5e87be(0x14d)][0x0];}[_0x4e5b61(0x13c)](_0x548d87){const _0x4bd5bb=_0x4e5b61,_0x5cc5f4=[];return this[_0x4bd5bb(0x143)][_0x4bd5bb(0x14b)](_0x4bd5bb(0x158))[_0x4bd5bb(0x14e)](_0x5cc5f4,_0x548d87),_0x5cc5f4[0x0];}[_0x4e5b61(0x144)](_0x2327ef){const _0x5242ea=_0x4e5b61;return _0x5242ea(0x158)==_0x2327ef[_0x5242ea(0x147)]&&_0x5242ea(0x13e)==_0x2327ef[_0x5242ea(0x151)][_0x5242ea(0x153)]&&0x1==_0x2327ef[_0x5242ea(0x154)]&&!_0x2327ef[_0x5242ea(0x14f)];}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
|
+
export default class ForwardDeletingActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _splitCurrent(combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x477054=_0x277c;(function(_0x46550c,_0x12dc80){const _0x18fbea=_0x277c,_0x147f06=_0x46550c();while(!![]){try{const _0x30a433=-parseInt(_0x18fbea(0x140))/0x1*(parseInt(_0x18fbea(0x142))/0x2)+parseInt(_0x18fbea(0x134))/0x3*(-parseInt(_0x18fbea(0x12d))/0x4)+-parseInt(_0x18fbea(0x13c))/0x5+parseInt(_0x18fbea(0x12f))/0x6*(-parseInt(_0x18fbea(0x132))/0x7)+-parseInt(_0x18fbea(0x143))/0x8*(-parseInt(_0x18fbea(0x12c))/0x9)+-parseInt(_0x18fbea(0x12e))/0xa+parseInt(_0x18fbea(0x128))/0xb;if(_0x30a433===_0x12dc80)break;else _0x147f06['push'](_0x147f06['shift']());}catch(_0x25abbb){_0x147f06['push'](_0x147f06['shift']());}}}(_0x4492,0x1a9cf));import _0x7440f4 from'./actioncompressor.js';import{arePositionsEqual as _0x7e3465}from'../utils.js';import{cloneDeep as _0x2ea612}from'lodash-es';function _0x277c(_0x3a2184,_0x45d11a){const _0x449298=_0x4492();return _0x277c=function(_0x277c11,_0x1169b9){_0x277c11=_0x277c11-0x127;let _0x3b1276=_0x449298[_0x277c11];return _0x3b1276;},_0x277c(_0x3a2184,_0x45d11a);}function _0x4492(){const _0xb82232=['__className','wasUndone','buffers','_splitCurrent','654295rZBfvj','root','MoveOperation','targetPosition','76133lOfbih','decompress','2zvEeIL','8LVGUSP','_compressSingleOperation','$graveyard','6725488xqnnCh','_compareOperations','sourcePosition','_checkOperation','1509615BWgZff','268756KxDxCX','2136470ZCKPiR','18snwTRC','_decompressSingleOperation','_getCompressorByName','268611ifWlLa','compress','6MAnBbJ','_combineNext','_context','howMany'];_0x4492=function(){return _0xb82232;};return _0x4492();}export default class h extends _0x7440f4{[_0x477054(0x135)](_0x61568f,_0x2d64f4){const _0x2c3c28=_0x477054;return _0x2d64f4[_0x2c3c28(0x137)]++,_0x2d64f4;}[_0x477054(0x13b)](_0x435af7){const _0x5f4537=_0x477054,_0x2e6d08=_0x2ea612(_0x435af7);return _0x2e6d08[_0x5f4537(0x137)]=0x1,_0x435af7[_0x5f4537(0x137)]--,_0x2e6d08;}[_0x477054(0x129)](_0x24182e,_0x5be814){const _0x5d5e91=_0x477054;return!(!this[_0x5d5e91(0x12b)](_0x24182e)||!this[_0x5d5e91(0x12b)](_0x5be814))&&(_0x7e3465(_0x24182e[_0x5d5e91(0x12a)],_0x5be814[_0x5d5e91(0x12a)])&&_0x7e3465(_0x24182e[_0x5d5e91(0x13f)],_0x5be814[_0x5d5e91(0x13f)]));}[_0x477054(0x144)](_0x3fff06){const _0x1615e5=_0x477054,_0x290094={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x1615e5(0x136)][_0x1615e5(0x131)](_0x1615e5(0x13e))[_0x1615e5(0x133)](_0x290094,[_0x3fff06]),_0x290094[_0x1615e5(0x13a)][0x0];}[_0x477054(0x130)](_0x2b816d){const _0x51eec9=_0x477054,_0x8facf2=[];return this[_0x51eec9(0x136)][_0x51eec9(0x131)](_0x51eec9(0x13e))[_0x51eec9(0x141)](_0x8facf2,_0x2b816d),_0x8facf2[0x0];}[_0x477054(0x12b)](_0x228311){const _0x312454=_0x477054;return _0x312454(0x13e)==_0x228311[_0x312454(0x138)]&&_0x312454(0x127)==_0x228311[_0x312454(0x13f)][_0x312454(0x13d)]&&0x1==_0x228311[_0x312454(0x137)]&&!_0x228311[_0x312454(0x139)];}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
|
+
export default class TypingActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDocs
|
|
10
|
+
*/
|
|
11
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _splitCurrent(combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x4c8f02=_0x18ac;(function(_0x2c4a30,_0x32dcb2){const _0x2f72ab=_0x18ac,_0x46cc13=_0x2c4a30();while(!![]){try{const _0x1776c7=parseInt(_0x2f72ab(0x1a0))/0x1+-parseInt(_0x2f72ab(0x197))/0x2+parseInt(_0x2f72ab(0x1a2))/0x3+parseInt(_0x2f72ab(0x1b1))/0x4+parseInt(_0x2f72ab(0x1a8))/0x5+-parseInt(_0x2f72ab(0x1a9))/0x6*(parseInt(_0x2f72ab(0x1b0))/0x7)+-parseInt(_0x2f72ab(0x1ae))/0x8;if(_0x1776c7===_0x32dcb2)break;else _0x46cc13['push'](_0x46cc13['shift']());}catch(_0x23c95e){_0x46cc13['push'](_0x46cc13['shift']());}}}(_0x18e2,0xf0bf1));import _0x5144fe from'./actioncompressor.js';import{arePositionsEqual as _0x166917,getPositionShiftedBy as _0x422eba}from'../utils.js';function _0x18ac(_0x52458e,_0x1e3d80){const _0x18e24f=_0x18e2();return _0x18ac=function(_0x18acb4,_0x483c39){_0x18acb4=_0x18acb4-0x193;let _0x1364a2=_0x18e24f[_0x18acb4];return _0x1364a2;},_0x18ac(_0x52458e,_0x1e3d80);}function _0x18e2(){const _0x10b808=['compress','_context','_combineNext','_compareOperations','1824875VAqfOp','from','3184650rZsmzK','buffers','__className','_compressSingleOperation','_getCompressorByName','nodes','3592775PcxAiS','2217564ENpMog','length','_compareAttributes','_splitCurrent','wasUndone','5363080OmZHRF','decompress','28FnwqNM','4766228ibtaFT','substr','next','data','keys','iterator','value','InsertOperation','every','3323358dYWeeg','_decompressSingleOperation','attributes','position','_checkOperation'];_0x18e2=function(){return _0x10b808;};return _0x18e2();}import{cloneDeep as _0xb46ed0}from'lodash-es';export default class m extends _0x5144fe{[_0x4c8f02(0x19e)](_0xc691cb,_0x5ea838){const _0x48ef4a=_0x4c8f02;return _0x5ea838[_0x48ef4a(0x1a7)][0x0][_0x48ef4a(0x1b4)]+=_0xc691cb[_0x48ef4a(0x1a7)][0x0][_0x48ef4a(0x1b4)],_0x5ea838;}[_0x4c8f02(0x1ac)](_0x1973b7){const _0x3898c6=_0x4c8f02,_0x3384c0=_0xb46ed0(_0x1973b7),_0x103bf9=_0x3384c0[_0x3898c6(0x1a7)][0x0],_0x255c71=_0x1973b7[_0x3898c6(0x1a7)][0x0],_0x2d238f=_0x255c71[_0x3898c6(0x1b4)][Symbol[_0x3898c6(0x193)]]()[_0x3898c6(0x1b3)]()[_0x3898c6(0x194)],_0x48c469=_0x2d238f[_0x3898c6(0x1aa)];return _0x103bf9[_0x3898c6(0x1b4)]=_0x2d238f,_0x255c71[_0x3898c6(0x1b4)]=_0x255c71[_0x3898c6(0x1b4)][_0x3898c6(0x1b2)](_0x48c469),_0x1973b7[_0x3898c6(0x19a)]=_0x422eba(_0x1973b7[_0x3898c6(0x19a)],_0x48c469),_0x3384c0;}[_0x4c8f02(0x19f)](_0x4ab053,_0x355a54){const _0x4cee60=_0x4c8f02;if(this[_0x4cee60(0x19b)](_0x4ab053)&&this[_0x4cee60(0x19b)](_0x355a54)){const _0xc08e4e=_0x4ab053[_0x4cee60(0x1a7)][0x0][_0x4cee60(0x1b4)][_0x4cee60(0x1aa)],_0x8e5cea=_0x166917(_0x422eba(_0x4ab053[_0x4cee60(0x19a)],_0xc08e4e),_0x355a54[_0x4cee60(0x19a)]),_0x43fb6e=_0x4ab053[_0x4cee60(0x1a7)][0x0],_0x5ca8b1=_0x355a54[_0x4cee60(0x1a7)][0x0];return _0x8e5cea&&this[_0x4cee60(0x1ab)](_0x43fb6e,_0x5ca8b1);}return!0x1;}[_0x4c8f02(0x1a5)](_0x72d334){const _0x429f33=_0x4c8f02,_0x2c30de={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x429f33(0x19d)][_0x429f33(0x1a6)](_0x429f33(0x195))[_0x429f33(0x19c)](_0x2c30de,[_0x72d334]),_0x2c30de[_0x429f33(0x1a3)][0x0];}[_0x4c8f02(0x198)](_0x45980f){const _0x2de835=_0x4c8f02,_0x397ebf=[];return this[_0x2de835(0x19d)][_0x2de835(0x1a6)](_0x2de835(0x195))[_0x2de835(0x1af)](_0x397ebf,_0x45980f),_0x397ebf[0x0];}[_0x4c8f02(0x19b)](_0x471717){const _0x5b979d=_0x4c8f02;return _0x5b979d(0x195)==_0x471717[_0x5b979d(0x1a4)]&&0x1==_0x471717[_0x5b979d(0x1a7)][_0x5b979d(0x1aa)]&&_0x471717[_0x5b979d(0x1a7)][0x0][_0x5b979d(0x1b4)]&&!_0x471717[_0x5b979d(0x1ad)]&&0x1==Array[_0x5b979d(0x1a1)](_0x471717[_0x5b979d(0x1a7)][0x0][_0x5b979d(0x1b4)])[_0x5b979d(0x1aa)];}[_0x4c8f02(0x1ab)](_0x4cd0ec,_0x5e21f4){const _0x3dad61=_0x4c8f02,_0x57e76c=Object[_0x3dad61(0x1b5)](_0x4cd0ec[_0x3dad61(0x199)]||{}),_0x229cb5=Object[_0x3dad61(0x1b5)](_0x5e21f4[_0x3dad61(0x199)]||{});return _0x57e76c[_0x3dad61(0x1aa)]===_0x229cb5[_0x3dad61(0x1aa)]&&_0x57e76c[_0x3dad61(0x196)](_0x3c2288=>_0x5e21f4[_0x3dad61(0x199)][_0x3c2288]&&_0x5e21f4[_0x3dad61(0x199)][_0x3c2288]===_0x4cd0ec[_0x3dad61(0x199)][_0x3c2288]);}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
|
+
export default class UserSelectionActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x3793b6=_0x1b1d;function _0x1b1d(_0x1deae5,_0x41c376){const _0x1978c6=_0x1978();return _0x1b1d=function(_0x1b1d48,_0x4fa8c0){_0x1b1d48=_0x1b1d48-0x190;let _0xc217b4=_0x1978c6[_0x1b1d48];return _0xc217b4;},_0x1b1d(_0x1deae5,_0x41c376);}(function(_0x17b0d7,_0x107be9){const _0x264885=_0x1b1d,_0x111767=_0x17b0d7();while(!![]){try{const _0x3cb32b=parseInt(_0x264885(0x190))/0x1+parseInt(_0x264885(0x19c))/0x2+-parseInt(_0x264885(0x1a0))/0x3*(-parseInt(_0x264885(0x19f))/0x4)+-parseInt(_0x264885(0x191))/0x5*(parseInt(_0x264885(0x198))/0x6)+-parseInt(_0x264885(0x1a6))/0x7+-parseInt(_0x264885(0x1aa))/0x8+-parseInt(_0x264885(0x1ac))/0x9*(-parseInt(_0x264885(0x199))/0xa);if(_0x3cb32b===_0x107be9)break;else _0x111767['push'](_0x111767['shift']());}catch(_0x4175a7){_0x111767['push'](_0x111767['shift']());}}}(_0x1978,0xd771c));function _0x1978(){const _0x496476=['_getCompressorByName','MarkerOperation','2612883xvbwVt','start','startsWith','_id','1565816qrxLkY','types','9hRhbVz','toNone','end','shift','__className','push','oldRange','57267OhHLyW','244350iHhrIt','buffers','newRange','_compareOperations','stickiness','compress','user:position:','24hoDHEb','6508660FlPNBu','decompress','split','254652fkeuTc','_compressSingleOperation','_decompressSingleOperation','3532NgkPYC','2757mVGUpt','user:','name','_context'];_0x1978=function(){return _0x496476;};return _0x1978();}import _0x188e9d from'./actioncompressor.js';import{arePositionsEqual as _0xb3fa34}from'../utils.js';import{cloneDeep as _0x5bd325}from'lodash-es';export default class f extends _0x188e9d{[_0x3793b6(0x196)](_0x2a5222,_0x380655){const _0x116c96=_0x3793b6;if(!this[_0x116c96(0x194)](_0x380655[0x0],_0x380655[0x1]))return!0x1;const _0x1bea61=_0x380655[_0x116c96(0x1af)]();return _0x1bea61[_0x116c96(0x1b2)]=null,_0x1bea61[_0x116c96(0x193)]&&_0xb3fa34(_0x1bea61[_0x116c96(0x193)][_0x116c96(0x1a7)],_0x1bea61[_0x116c96(0x193)][_0x116c96(0x1ae)])&&(_0x1bea61[_0x116c96(0x193)][_0x116c96(0x1ae)]=null),_0x380655[_0x116c96(0x1af)](),_0x2a5222[_0x116c96(0x1ab)][_0x116c96(0x1b1)](this[_0x116c96(0x1a9)]),_0x2a5222[_0x116c96(0x1ab)][_0x116c96(0x1b1)](0x0),_0x2a5222[_0x116c96(0x192)][_0x116c96(0x1b1)](this[_0x116c96(0x19d)](_0x1bea61)),!0x0;}[_0x3793b6(0x19a)](_0x51238b,_0x2d29f4){const _0x29e008=_0x3793b6,_0x2eb777=this[_0x29e008(0x19e)](_0x2d29f4);_0x2eb777[_0x29e008(0x193)]&&!_0x2eb777[_0x29e008(0x193)][_0x29e008(0x1ae)]&&(_0x2eb777[_0x29e008(0x193)][_0x29e008(0x1ae)]=_0x5bd325(_0x2eb777[_0x29e008(0x193)][_0x29e008(0x1a7)]));const _0x1bfc20=_0x5bd325(_0x2eb777);_0x1bfc20[_0x29e008(0x193)]&&(_0x1bfc20[_0x29e008(0x193)][_0x29e008(0x1a7)][_0x29e008(0x195)]=_0x29e008(0x1ad),_0x1bfc20[_0x29e008(0x193)][_0x29e008(0x1ae)]=_0x5bd325(_0x1bfc20[_0x29e008(0x193)][_0x29e008(0x1a7)])),_0x1bfc20[_0x29e008(0x1a2)]=_0x29e008(0x197)+_0x1bfc20[_0x29e008(0x1a2)][_0x29e008(0x19b)](':')[0x2],_0x2d29f4[_0x29e008(0x1ab)][_0x29e008(0x1af)](),_0x51238b[_0x29e008(0x1b1)](_0x2eb777),_0x51238b[_0x29e008(0x1b1)](_0x1bfc20);}[_0x3793b6(0x19d)](_0x5f3c6c){const _0x1d9096=_0x3793b6,_0x4cc8e1={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x1d9096(0x1a3)][_0x1d9096(0x1a4)](_0x1d9096(0x1a5))[_0x1d9096(0x196)](_0x4cc8e1,[_0x5f3c6c]),_0x4cc8e1[_0x1d9096(0x192)][0x0];}[_0x3793b6(0x19e)](_0x20c3e7){const _0x29402e=_0x3793b6,_0x3ca225=[];return this[_0x29402e(0x1a3)][_0x29402e(0x1a4)](_0x29402e(0x1a5))[_0x29402e(0x19a)](_0x3ca225,_0x20c3e7),_0x3ca225[0x0];}[_0x3793b6(0x194)](_0x46bf80,_0x1cf80d){const _0x58cae1=_0x3793b6;return!(!_0x46bf80||!_0x1cf80d)&&(_0x58cae1(0x1a5)==_0x46bf80[_0x58cae1(0x1b0)]&&_0x58cae1(0x1a5)==_0x1cf80d[_0x58cae1(0x1b0)]&&!(!_0x46bf80[_0x58cae1(0x1a2)][_0x58cae1(0x1a8)](_0x58cae1(0x1a1))||!_0x1cf80d[_0x58cae1(0x1a2)][_0x58cae1(0x1a8)](_0x58cae1(0x1a1))||_0x46bf80[_0x58cae1(0x1a2)]==_0x1cf80d[_0x58cae1(0x1a2)]));}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Compresses and decompresses given set of operations in JSON format to/from the binary format using `Protocol Buffers`.
|
|
7
|
+
*/
|
|
8
|
+
export default class Compressor {
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Compress given list of operations in JSON format.
|
|
12
|
+
*
|
|
13
|
+
* **Note** It tries to combine typing-like or deleting-like operations into the one buffer.
|
|
14
|
+
* **Note** Input data will be consumed and modified during compression process. If you need untouched data
|
|
15
|
+
* you need to copy it before the compression.
|
|
16
|
+
*/
|
|
17
|
+
compress(operations: Array<any>): CompressedOperationsData;
|
|
18
|
+
/**
|
|
19
|
+
* Decompress given data to the list of operations in JSON format.
|
|
20
|
+
*
|
|
21
|
+
* **Note** Input data will be consumed during decompression process. If you need untouched data
|
|
22
|
+
* you need to copy it before the decompression.
|
|
23
|
+
*
|
|
24
|
+
* @param data Compressed operations.
|
|
25
|
+
* @returns List of operations in JSON format.
|
|
26
|
+
*/
|
|
27
|
+
decompress(data: CompressedOperationsData): Array<any>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Compressed operations data.
|
|
31
|
+
*/
|
|
32
|
+
export type CompressedOperationsData = {
|
|
33
|
+
/**
|
|
34
|
+
* List of operations compressed to the binary format.
|
|
35
|
+
*/
|
|
36
|
+
buffers: Array<Uint8Array>;
|
|
37
|
+
/**
|
|
38
|
+
* List of compressor identifiers. According to this types a proper compressor will be used for the decompression.
|
|
39
|
+
*/
|
|
40
|
+
types: Array<number>;
|
|
41
|
+
/**
|
|
42
|
+
* Base version of the first compressed operation.
|
|
43
|
+
*/
|
|
44
|
+
baseVersion: number;
|
|
45
|
+
};
|