@ckeditor/ckeditor5-operations-compressor
Advanced tools
Comparing version 1.0.1 to 1.1.0
Changelog | ||
========= | ||
## 1.1.0 (2019-02-25) | ||
Added special compression codes for annotation markers. | ||
## 1.0.1 (2018-12-06) | ||
@@ -8,4 +13,5 @@ | ||
## 1.0.0 (2018-10-08) | ||
The first stable release of the CKEditor 5 operations compressor. Compress and decompress a collection of operations using [Protocol Buffers for JavaScript](https://github.com/dcodeIO/ProtoBuf.js/) and custom optimizations. |
@@ -5,5 +5,5 @@ Software License Agreement | ||
**CKEditor 5 operations compressor**<br> | ||
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
Copyright (c) 2003-2019, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law. | ||
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law. | ||
For more details about available licensing options please contact us at sales@cksource.com. | ||
@@ -10,0 +10,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-operations-compressor", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "CKEditor 5 operations compressor for real-time collaboration.", | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"homepage": "https://ckeditor.com/collaborative-editing/", | ||
"homepage": "https://ckeditor.com/collaboration/real-time/", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "CKEditor", |
# CKEditor 5 operations compressor | ||
CKEditor 5 operations compressor is a low-level API that compresses and decompresses operations to a normalized binary format in order to decrease network usage during real-time collaborative editing. It is required by the [CKEditor 5 real-time collaborative editing](https://ckeditor.com/collaborative-editing/) feature to enable collaboration in [CKEditor 5](https://ckeditor.com/ckeditor-5/). | ||
CKEditor 5 operations compressor is a low-level API that compresses and decompresses operations to a normalized binary format in order to decrease network usage during real-time collaborative editing. It is required by the [CKEditor 5 real-time collaborative editing](https://ckeditor.com/collaboration/real-time/) feature to enable collaboration in [CKEditor 5](https://ckeditor.com/ckeditor-5/). | ||
@@ -16,5 +16,5 @@ For more information about collaboration see the [CKEditor 5 real-time collaboration documentation](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/real-time-collaboration/real-time-collaboration.html). | ||
**CKEditor 5 operations compressor**<br> | ||
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
Copyright (c) 2003-2019, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law. | ||
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law. | ||
For more details about available licensing options please contact us at sales@cksource.com. | ||
@@ -21,0 +21,0 @@ |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x1f43=['shift','push','types','decompress','compress','length'];(function(_0x3a034e,_0x42782b){var _0x57a9e8=function(_0x82727e){while(--_0x82727e){_0x3a034e['push'](_0x3a034e['shift']());}};_0x57a9e8(++_0x42782b);}(_0x1f43,0x124));var _0x5b63=function(_0x3f44a4,_0x5a50e4){_0x3f44a4=_0x3f44a4-0x0;var _0x45891e=_0x1f43[_0x3f44a4];return _0x45891e;};import{cloneDeep}from'lodash-es';export default class ActionCompressor{constructor(_0x5053aa,_0x2f0b08){this['id']=_0x5053aa,this['s']=_0x2f0b08;}[_0x5b63('0x0')](_0x14648d,_0x248f66){let _0x19cf5d;for(;_0x248f66[_0x5b63('0x1')]>0x1&&this['o'](_0x248f66[0x0],_0x248f66[0x1]);)_0x19cf5d?(_0x19cf5d=this['e'](_0x248f66[_0x5b63('0x2')](),_0x19cf5d),_0x14648d['types'][_0x5b63('0x3')](0x0)):(_0x19cf5d=cloneDeep(_0x248f66[_0x5b63('0x2')]()),_0x14648d['types'][_0x5b63('0x3')](this['id']));return!!_0x19cf5d&&(_0x19cf5d=this['e'](_0x248f66[_0x5b63('0x2')](),_0x19cf5d),_0x14648d[_0x5b63('0x4')][_0x5b63('0x3')](0x0),_0x14648d['buffers'][_0x5b63('0x3')](this['r'](_0x19cf5d)),!0x0);}[_0x5b63('0x5')](_0x8464fe,_0x54f6fe){const _0x25f9df=this['i'](_0x54f6fe);for(;0x0==_0x54f6fe[_0x5b63('0x4')][0x0];)_0x54f6fe[_0x5b63('0x4')][_0x5b63('0x2')](),_0x8464fe[_0x5b63('0x3')](this['h'](_0x25f9df));_0x8464fe['push'](_0x25f9df);}}; | ||
var _0x4ef7=['compress','length','types','push','shift','buffers','decompress'];(function(_0x9f01dc,_0x3909e3){var _0x3dad5a=function(_0x37a413){while(--_0x37a413){_0x9f01dc['push'](_0x9f01dc['shift']());}};_0x3dad5a(++_0x3909e3);}(_0x4ef7,0x1ce));var _0x2f85=function(_0x3a593b,_0x5bbc16){_0x3a593b=_0x3a593b-0x0;var _0x70ce67=_0x4ef7[_0x3a593b];return _0x70ce67;};import{cloneDeep}from'lodash-es';export default class ActionCompressor{constructor(_0x82c243,_0xd20d12){this['id']=_0x82c243,this['s']=_0xd20d12;}[_0x2f85('0x0')](_0xd32066,_0x5bb0b1){let _0xf3b0d;for(;_0x5bb0b1[_0x2f85('0x1')]>0x1&&this['o'](_0x5bb0b1[0x0],_0x5bb0b1[0x1]);)_0xf3b0d?(_0xf3b0d=this['e'](_0x5bb0b1['shift'](),_0xf3b0d),_0xd32066[_0x2f85('0x2')][_0x2f85('0x3')](0x0)):(_0xf3b0d=cloneDeep(_0x5bb0b1[_0x2f85('0x4')]()),_0xd32066[_0x2f85('0x2')][_0x2f85('0x3')](this['id']));return!!_0xf3b0d&&(_0xf3b0d=this['e'](_0x5bb0b1[_0x2f85('0x4')](),_0xf3b0d),_0xd32066[_0x2f85('0x2')][_0x2f85('0x3')](0x0),_0xd32066[_0x2f85('0x5')][_0x2f85('0x3')](this['r'](_0xf3b0d)),!0x0);}[_0x2f85('0x6')](_0x56b99c,_0x80e15c){const _0x146eeb=this['i'](_0x80e15c);for(;0x0==_0x80e15c[_0x2f85('0x2')][0x0];)_0x80e15c[_0x2f85('0x2')]['shift'](),_0x56b99c[_0x2f85('0x3')](this['h'](_0x146eeb));_0x56b99c[_0x2f85('0x3')](_0x146eeb);}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x2a81=['targetPosition','MoveOperation','compress','buffers','__className','$graveyard','root','wasUndone','howMany','sourcePosition'];(function(_0x2d8325,_0x519c94){var _0x4cce99=function(_0x405707){while(--_0x405707){_0x2d8325['push'](_0x2d8325['shift']());}};_0x4cce99(++_0x519c94);}(_0x2a81,0x1ac));var _0x5023=function(_0x13b3c6,_0x49e433){_0x13b3c6=_0x13b3c6-0x0;var _0xcdd474=_0x2a81[_0x13b3c6];return _0xcdd474;};import _0x85dc4a from'./actioncompressor';import{arePositionsEqual,getPositionShiftedBy}from'../utils';import{cloneDeep}from'lodash-es';export default class DeletingActionCompressor extends _0x85dc4a{['e'](e,o){return o[_0x5023('0x0')]++,o[_0x5023('0x1')]=cloneDeep(e['sourcePosition']),o;}['h'](e){const o=cloneDeep(e);return e[_0x5023('0x0')]--,o[_0x5023('0x0')]=0x1,o[_0x5023('0x1')]=getPositionShiftedBy(o['sourcePosition'],e[_0x5023('0x0')]),o;}['o'](e,o){return!(!_checkOperation(e)||!_checkOperation(o))&&(arePositionsEqual(getPositionShiftedBy(e['sourcePosition'],-0x1),o[_0x5023('0x1')])&&arePositionsEqual(e[_0x5023('0x2')],o['targetPosition']));}['r'](e){const o={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x5023('0x3'))[_0x5023('0x4')](o,[e]),o[_0x5023('0x5')][0x0];}['i'](e){const o=[];return this['s']['n'](_0x5023('0x3'))['decompress'](o,e),o[0x0];}};function _checkOperation(e){return _0x5023('0x3')==e[_0x5023('0x6')]&&_0x5023('0x7')==e[_0x5023('0x2')][_0x5023('0x8')]&&0x1==e[_0x5023('0x0')]&&!e[_0x5023('0x9')];} | ||
var _0x37b0=['MoveOperation','compress','decompress','__className','$graveyard','root','wasUndone','sourcePosition','howMany','targetPosition'];(function(_0x2d8f05,_0x4b81bb){var _0x4d74cb=function(_0x32719f){while(--_0x32719f){_0x2d8f05['push'](_0x2d8f05['shift']());}};_0x4d74cb(++_0x4b81bb);}(_0x37b0,0x89));var _0x3a67=function(_0x4bd822,_0x2bd6f7){_0x4bd822=_0x4bd822-0x0;var _0xb4bdb3=_0x37b0[_0x4bd822];return _0xb4bdb3;};import _0x3b6cea from'./actioncompressor';import{arePositionsEqual,getPositionShiftedBy}from'../utils';import{cloneDeep}from'lodash-es';export default class DeletingActionCompressor extends _0x3b6cea{['e'](e,o){return o['howMany']++,o[_0x3a67('0x0')]=cloneDeep(e[_0x3a67('0x0')]),o;}['h'](e){const o=cloneDeep(e);return e['howMany']--,o[_0x3a67('0x1')]=0x1,o[_0x3a67('0x0')]=getPositionShiftedBy(o['sourcePosition'],e[_0x3a67('0x1')]),o;}['o'](e,o){return!(!_checkOperation(e)||!_checkOperation(o))&&(arePositionsEqual(getPositionShiftedBy(e[_0x3a67('0x0')],-0x1),o['sourcePosition'])&&arePositionsEqual(e[_0x3a67('0x2')],o[_0x3a67('0x2')]));}['r'](e){const o={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x3a67('0x3'))[_0x3a67('0x4')](o,[e]),o['buffers'][0x0];}['i'](e){const o=[];return this['s']['n'](_0x3a67('0x3'))[_0x3a67('0x5')](o,e),o[0x0];}};function _checkOperation(e){return _0x3a67('0x3')==e[_0x3a67('0x6')]&&_0x3a67('0x7')==e['targetPosition'][_0x3a67('0x8')]&&0x1==e['howMany']&&!e[_0x3a67('0x9')];} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x54d9=['targetPosition','MoveOperation','compress','decompress','__className','$graveyard','root','wasUndone','howMany','sourcePosition'];(function(_0x2b839a,_0x30a615){var _0x36fc5a=function(_0x5d72c5){while(--_0x5d72c5){_0x2b839a['push'](_0x2b839a['shift']());}};_0x36fc5a(++_0x30a615);}(_0x54d9,0x102));var _0x16b7=function(_0x3d9334,_0x2580ae){_0x3d9334=_0x3d9334-0x0;var _0x33f04c=_0x54d9[_0x3d9334];return _0x33f04c;};import _0x33bb8c from'./actioncompressor';import{arePositionsEqual}from'../utils';import{cloneDeep}from'lodash-es';export default class ForwardDeletingActionCompressor extends _0x33bb8c{['e'](e,o){return o[_0x16b7('0x0')]++,o;}['h'](e){const o=cloneDeep(e);return o['howMany']=0x1,e['howMany']--,o;}['o'](e,o){return!(!_checkOperation(e)||!_checkOperation(o))&&(arePositionsEqual(e[_0x16b7('0x1')],o[_0x16b7('0x1')])&&arePositionsEqual(e['targetPosition'],o[_0x16b7('0x2')]));}['r'](e){const o={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x16b7('0x3'))[_0x16b7('0x4')](o,[e]),o['buffers'][0x0];}['i'](e){const o=[];return this['s']['n'](_0x16b7('0x3'))[_0x16b7('0x5')](o,e),o[0x0];}};function _checkOperation(e){return'MoveOperation'==e[_0x16b7('0x6')]&&_0x16b7('0x7')==e['targetPosition'][_0x16b7('0x8')]&&0x1==e[_0x16b7('0x0')]&&!e[_0x16b7('0x9')];} | ||
var _0xf2aa=['$graveyard','root','howMany','sourcePosition','targetPosition','MoveOperation','buffers','__className'];(function(_0xe3dace,_0x36aa07){var _0x5a2439=function(_0x2308e7){while(--_0x2308e7){_0xe3dace['push'](_0xe3dace['shift']());}};_0x5a2439(++_0x36aa07);}(_0xf2aa,0x8a));var _0x25dc=function(_0xb3de0e,_0x580486){_0xb3de0e=_0xb3de0e-0x0;var _0x384be4=_0xf2aa[_0xb3de0e];return _0x384be4;};import _0x4825ba from'./actioncompressor';import{arePositionsEqual}from'../utils';import{cloneDeep}from'lodash-es';export default class ForwardDeletingActionCompressor extends _0x4825ba{['e'](e,o){return o['howMany']++,o;}['h'](e){const o=cloneDeep(e);return o[_0x25dc('0x0')]=0x1,e[_0x25dc('0x0')]--,o;}['o'](e,o){return!(!_checkOperation(e)||!_checkOperation(o))&&(arePositionsEqual(e[_0x25dc('0x1')],o[_0x25dc('0x1')])&&arePositionsEqual(e[_0x25dc('0x2')],o['targetPosition']));}['r'](e){const o={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x25dc('0x3'))['compress'](o,[e]),o[_0x25dc('0x4')][0x0];}['i'](e){const o=[];return this['s']['n']('MoveOperation')['decompress'](o,e),o[0x0];}};function _checkOperation(e){return _0x25dc('0x3')==e[_0x25dc('0x5')]&&_0x25dc('0x6')==e[_0x25dc('0x2')][_0x25dc('0x7')]&&0x1==e[_0x25dc('0x0')]&&!e['wasUndone'];} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x20bf=['__className','wasUndone','keys','attributes','every','nodes','data','from','substr','position','length','buffers','decompress'];(function(_0x5e0065,_0x1e29d5){var _0x391972=function(_0x20f408){while(--_0x20f408){_0x5e0065['push'](_0x5e0065['shift']());}};_0x391972(++_0x1e29d5);}(_0x20bf,0x87));var _0x32ef=function(_0x10828c,_0x5a2315){_0x10828c=_0x10828c-0x0;var _0x3f5373=_0x20bf[_0x10828c];return _0x3f5373;};import _0x3e30cc from'./actioncompressor';import{arePositionsEqual,getPositionShiftedBy}from'../utils';import{cloneDeep}from'lodash-es';export default class TypingActionCompressor extends _0x3e30cc{['e'](e,t){return t[_0x32ef('0x0')][0x0][_0x32ef('0x1')]+=e[_0x32ef('0x0')][0x0]['data'],t;}['h'](e){const t=cloneDeep(e),r=t[_0x32ef('0x0')][0x0],o=e[_0x32ef('0x0')][0x0],n=Array[_0x32ef('0x2')](o[_0x32ef('0x1')])[0x0],i=n['length'];return r['data']=n,o[_0x32ef('0x1')]=o[_0x32ef('0x1')][_0x32ef('0x3')](i),e[_0x32ef('0x4')]=getPositionShiftedBy(e[_0x32ef('0x4')],i),t;}['o'](e,t){if(_checkOperation(e)&&_checkOperation(t)){const r=e[_0x32ef('0x0')][0x0]['data'][_0x32ef('0x5')],o=arePositionsEqual(getPositionShiftedBy(e['position'],r),t[_0x32ef('0x4')]),n=e[_0x32ef('0x0')][0x0],i=t[_0x32ef('0x0')][0x0];return o&&_compareAttributes(n,i);}return!0x1;}['r'](e){const t={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n']('InsertOperation')['compress'](t,[e]),t[_0x32ef('0x6')][0x0];}['i'](e){const t=[];return this['s']['n']('InsertOperation')[_0x32ef('0x7')](t,e),t[0x0];}};function _checkOperation(e){return'InsertOperation'==e[_0x32ef('0x8')]&&0x1==e[_0x32ef('0x0')][_0x32ef('0x5')]&&e[_0x32ef('0x0')][0x0][_0x32ef('0x1')]&&!e[_0x32ef('0x9')]&&0x1==Array[_0x32ef('0x2')](e[_0x32ef('0x0')][0x0][_0x32ef('0x1')])[_0x32ef('0x5')];}function _compareAttributes(e,t){const r=Object[_0x32ef('0xa')](e[_0x32ef('0xb')]||{}),o=Object[_0x32ef('0xa')](t['attributes']||{});return r['length']===o['length']&&r[_0x32ef('0xc')](r=>t[_0x32ef('0xb')][r]&&t[_0x32ef('0xb')][r]===e['attributes'][r]);} | ||
var _0x3ab7=['compress','buffers','decompress','wasUndone','attributes','keys','every','nodes','data','from','substr','position','length','InsertOperation'];(function(_0x12e8c1,_0x2894c2){var _0x11ff05=function(_0xf02f38){while(--_0xf02f38){_0x12e8c1['push'](_0x12e8c1['shift']());}};_0x11ff05(++_0x2894c2);}(_0x3ab7,0x111));var _0x2ec3=function(_0x16255b,_0x3b5b0e){_0x16255b=_0x16255b-0x0;var _0x4c77bb=_0x3ab7[_0x16255b];return _0x4c77bb;};import _0x260d14 from'./actioncompressor';import{arePositionsEqual,getPositionShiftedBy}from'../utils';import{cloneDeep}from'lodash-es';export default class TypingActionCompressor extends _0x260d14{['e'](e,t){return t[_0x2ec3('0x0')][0x0][_0x2ec3('0x1')]+=e[_0x2ec3('0x0')][0x0][_0x2ec3('0x1')],t;}['h'](e){const t=cloneDeep(e),r=t[_0x2ec3('0x0')][0x0],o=e[_0x2ec3('0x0')][0x0],n=Array[_0x2ec3('0x2')](o[_0x2ec3('0x1')])[0x0],i=n['length'];return r['data']=n,o[_0x2ec3('0x1')]=o['data'][_0x2ec3('0x3')](i),e[_0x2ec3('0x4')]=getPositionShiftedBy(e[_0x2ec3('0x4')],i),t;}['o'](e,t){if(_checkOperation(e)&&_checkOperation(t)){const r=e[_0x2ec3('0x0')][0x0][_0x2ec3('0x1')][_0x2ec3('0x5')],o=arePositionsEqual(getPositionShiftedBy(e['position'],r),t[_0x2ec3('0x4')]),n=e[_0x2ec3('0x0')][0x0],i=t['nodes'][0x0];return o&&_compareAttributes(n,i);}return!0x1;}['r'](e){const t={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x2ec3('0x6'))[_0x2ec3('0x7')](t,[e]),t[_0x2ec3('0x8')][0x0];}['i'](e){const t=[];return this['s']['n'](_0x2ec3('0x6'))[_0x2ec3('0x9')](t,e),t[0x0];}};function _checkOperation(e){return _0x2ec3('0x6')==e['__className']&&0x1==e[_0x2ec3('0x0')][_0x2ec3('0x5')]&&e['nodes'][0x0][_0x2ec3('0x1')]&&!e[_0x2ec3('0xa')]&&0x1==Array['from'](e[_0x2ec3('0x0')][0x0]['data'])[_0x2ec3('0x5')];}function _compareAttributes(e,t){const r=Object['keys'](e[_0x2ec3('0xb')]||{}),o=Object[_0x2ec3('0xc')](t['attributes']||{});return r[_0x2ec3('0x5')]===o[_0x2ec3('0x5')]&&r[_0x2ec3('0xd')](r=>t['attributes'][r]&&t['attributes'][r]===e['attributes'][r]);} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x1aab=['user:position:','MarkerOperation','__className','startsWith','user:range','user:position','shift','oldRange','newRange','end','types','push','buffers','decompress','start','toNone','name'];(function(_0x25c360,_0x9a636f){var _0x4e4f63=function(_0x540aa5){while(--_0x540aa5){_0x25c360['push'](_0x25c360['shift']());}};_0x4e4f63(++_0x9a636f);}(_0x1aab,0x19e));var _0x8531=function(_0xd35f99,_0x24ded3){_0xd35f99=_0xd35f99-0x0;var _0x3882ed=_0x1aab[_0xd35f99];return _0x3882ed;};import _0x7b4ce6 from'./actioncompressor';import{arePositionsEqual}from'../utils';import{cloneDeep}from'lodash-es';export default class UserSelectionActionCompressor extends _0x7b4ce6{['compress'](e,o){if(!_compareOperations(o[0x0],o[0x1]))return!0x1;const r=o[_0x8531('0x0')]();return r[_0x8531('0x1')]=null,r[_0x8531('0x2')]&&arePositionsEqual(r[_0x8531('0x2')]['start'],r[_0x8531('0x2')]['end'])&&(r['newRange'][_0x8531('0x3')]=null),o[_0x8531('0x0')](),e[_0x8531('0x4')][_0x8531('0x5')](this['id']),e['types']['push'](0x0),e[_0x8531('0x6')][_0x8531('0x5')](this['r'](r)),!0x0;}[_0x8531('0x7')](e,o){const r=this['i'](o);r[_0x8531('0x2')]&&!r[_0x8531('0x2')][_0x8531('0x3')]&&(r[_0x8531('0x2')][_0x8531('0x3')]=cloneDeep(r[_0x8531('0x2')][_0x8531('0x8')]));const s=cloneDeep(r);s[_0x8531('0x2')]&&(s[_0x8531('0x2')][_0x8531('0x8')]['stickiness']=_0x8531('0x9'),s[_0x8531('0x2')][_0x8531('0x3')]=cloneDeep(s['newRange'][_0x8531('0x8')])),s[_0x8531('0xa')]=_0x8531('0xb')+s[_0x8531('0xa')]['split'](':')[0x2],o[_0x8531('0x4')][_0x8531('0x0')](),e[_0x8531('0x5')](r),e[_0x8531('0x5')](s);}['r'](e){const o={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x8531('0xc'))['compress'](o,[e]),o[_0x8531('0x6')][0x0];}['i'](e){const o=[];return this['s']['n'](_0x8531('0xc'))['decompress'](o,e),o[0x0];}};function _compareOperations(e,o){return!(!e||!o)&&(_0x8531('0xc')==e[_0x8531('0xd')]&&_0x8531('0xc')==o[_0x8531('0xd')]&&!(!e[_0x8531('0xa')][_0x8531('0xe')](_0x8531('0xf'))&&!o[_0x8531('0xa')][_0x8531('0xe')](_0x8531('0x10'))));} | ||
var _0x199a=['__className','user:range','startsWith','compress','newRange','start','end','types','push','decompress','stickiness','toNone','name','shift','MarkerOperation','buffers'];(function(_0x405c87,_0x128b18){var _0x138fc3=function(_0x27a732){while(--_0x27a732){_0x405c87['push'](_0x405c87['shift']());}};_0x138fc3(++_0x128b18);}(_0x199a,0xe3));var _0x476a=function(_0x4bd822,_0x2bd6f7){_0x4bd822=_0x4bd822-0x0;var _0xb4bdb3=_0x199a[_0x4bd822];return _0xb4bdb3;};import _0x45088a from'./actioncompressor';import{arePositionsEqual}from'../utils';import{cloneDeep}from'lodash-es';export default class UserSelectionActionCompressor extends _0x45088a{[_0x476a('0x0')](e,o){if(!_compareOperations(o[0x0],o[0x1]))return!0x1;const r=o['shift']();return r['oldRange']=null,r[_0x476a('0x1')]&&arePositionsEqual(r[_0x476a('0x1')][_0x476a('0x2')],r[_0x476a('0x1')][_0x476a('0x3')])&&(r[_0x476a('0x1')]['end']=null),o['shift'](),e[_0x476a('0x4')][_0x476a('0x5')](this['id']),e[_0x476a('0x4')][_0x476a('0x5')](0x0),e['buffers'][_0x476a('0x5')](this['r'](r)),!0x0;}[_0x476a('0x6')](e,o){const r=this['i'](o);r[_0x476a('0x1')]&&!r[_0x476a('0x1')][_0x476a('0x3')]&&(r[_0x476a('0x1')][_0x476a('0x3')]=cloneDeep(r['newRange']['start']));const s=cloneDeep(r);s[_0x476a('0x1')]&&(s[_0x476a('0x1')][_0x476a('0x2')][_0x476a('0x7')]=_0x476a('0x8'),s['newRange'][_0x476a('0x3')]=cloneDeep(s[_0x476a('0x1')]['start'])),s[_0x476a('0x9')]='user:position:'+s[_0x476a('0x9')]['split'](':')[0x2],o[_0x476a('0x4')][_0x476a('0xa')](),e['push'](r),e[_0x476a('0x5')](s);}['r'](e){const o={'types':[],'buffers':[],'baseVersion':0x0};return this['s']['n'](_0x476a('0xb'))['compress'](o,[e]),o[_0x476a('0xc')][0x0];}['i'](e){const o=[];return this['s']['n']('MarkerOperation')[_0x476a('0x6')](o,e),o[0x0];}};function _compareOperations(e,o){return!(!e||!o)&&(_0x476a('0xb')==e[_0x476a('0xd')]&&'MarkerOperation'==o[_0x476a('0xd')]&&!(!e[_0x476a('0x9')]['startsWith'](_0x476a('0xe'))&&!o[_0x476a('0x9')][_0x476a('0xf')]('user:position')));} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x270e=['bool','uint32','Position','string'];(function(_0x1de7c8,_0x3d059b){var _0x5b6b44=function(_0x494fe9){while(--_0x494fe9){_0x1de7c8['push'](_0x1de7c8['shift']());}};_0x5b6b44(++_0x3d059b);}(_0x270e,0x134));var _0x55b8=function(_0xd80e8c,_0x22e766){_0xd80e8c=_0xd80e8c-0x0;var _0x46c688=_0x270e[_0xd80e8c];return _0x46c688;};export default{'Position':{'fields':{'root':{'type':'string','id':0x1},'rootMain':{'type':_0x55b8('0x0'),'id':0x2},'rootGraveyard':{'type':_0x55b8('0x0'),'id':0x3},'path':{'rule':'repeated','type':_0x55b8('0x1'),'id':0x4},'stickiness':{'type':'string','id':0x5}}},'Range':{'fields':{'start':{'type':_0x55b8('0x2'),'id':0x1},'end':{'type':_0x55b8('0x2'),'id':0x2}}},'Element':{'fields':{'name':{'type':_0x55b8('0x3'),'id':0x1},'children':{'rule':'repeated','type':'Element','id':0x2},'data':{'type':_0x55b8('0x3'),'id':0x3},'attributesBoolean':{'keyType':_0x55b8('0x3'),'type':'bool','id':0x4},'attributesJson':{'type':_0x55b8('0x3'),'id':0x5}}}}; | ||
var _0x4370=['bool','repeated','uint32','string','Position','Element'];(function(_0x2fa7b9,_0x3e179e){var _0x2732b5=function(_0x7b7f49){while(--_0x7b7f49){_0x2fa7b9['push'](_0x2fa7b9['shift']());}};_0x2732b5(++_0x3e179e);}(_0x4370,0xc0));var _0x3778=function(_0x3633fd,_0x45f1b1){_0x3633fd=_0x3633fd-0x0;var _0x66622e=_0x4370[_0x3633fd];return _0x66622e;};export default{'Position':{'fields':{'root':{'type':'string','id':0x1},'rootMain':{'type':_0x3778('0x0'),'id':0x2},'rootGraveyard':{'type':'bool','id':0x3},'path':{'rule':_0x3778('0x1'),'type':_0x3778('0x2'),'id':0x4},'stickiness':{'type':_0x3778('0x3'),'id':0x5}}},'Range':{'fields':{'start':{'type':_0x3778('0x4'),'id':0x1},'end':{'type':_0x3778('0x4'),'id':0x2}}},'Element':{'fields':{'name':{'type':'string','id':0x1},'children':{'rule':_0x3778('0x1'),'type':_0x3778('0x5'),'id':0x2},'data':{'type':_0x3778('0x3'),'id':0x3},'attributesBoolean':{'keyType':_0x3778('0x3'),'type':_0x3778('0x0'),'id':0x4},'attributesJson':{'type':_0x3778('0x3'),'id':0x5}}}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x4457=['TypingAction','DeletingAction','ForwardDeletingAction','UserSelectionAction','set','length','compress','__className','decompress','types','forEach','baseVersion','registerDescriptor','Position','Range','Element','AttributeOperation','description','InsertOperation','MergeOperation','MoveOperation','RootAttributeOperation','SplitOperation','build','NoOperation','MarkerOperation','RenameOperation'];(function(_0x102c87,_0x5d2ebb){var _0x2aff04=function(_0x58585e){while(--_0x58585e){_0x102c87['push'](_0x102c87['shift']());}};_0x2aff04(++_0x5d2ebb);}(_0x4457,0x1f2));var _0x41ee=function(_0x23cc15,_0x4bbac6){_0x23cc15=_0x23cc15-0x0;var _0x3e4415=_0x4457[_0x23cc15];return _0x3e4415;};import _0x1dad62 from'./protobuffactory';import _0x16bd2e from'./commondescriptions';import _0x3ef745 from'./operationcompressor/attributeoperationcompressor';import _0x1bfbb6 from'./operationcompressor/insertoperationcompressor';import _0x333a3e from'./operationcompressor/markeroperationcompressor';import _0x10f085 from'./operationcompressor/mergeoperationcompressor';import _0x574243 from'./operationcompressor/moveoperationcompressor';import _0xcce358 from'./operationcompressor/renameoperationcompressor';import _0x1e284d from'./operationcompressor/rootattributeoperationcompressor';import _0x5bab60 from'./operationcompressor/splitoperationcompressor';import _0x4478da from'./operationcompressor/nooperationcompressor';import _0x3826ad from'./actioncompressor/typingactioncompressor';import _0x49a30d from'./actioncompressor/deletingactioncompressor';import _0x17b900 from'./actioncompressor/forwarddeletingactioncompressor';import _0x38474f from'./actioncompressor/userselectionactioncompressor';export default class Compressor{constructor(){this['p']=new Map(),this['m']=new Map(),this['a']=new _0x1dad62(),this['a'][_0x41ee('0x0')](_0x41ee('0x1'),_0x16bd2e[_0x41ee('0x1')]),this['a'][_0x41ee('0x0')](_0x41ee('0x2'),_0x16bd2e['Range']),this['a'][_0x41ee('0x0')](_0x41ee('0x3'),_0x16bd2e[_0x41ee('0x3')]),this['a'][_0x41ee('0x0')](_0x41ee('0x4'),_0x3ef745[_0x41ee('0x5')]),this['a'][_0x41ee('0x0')](_0x41ee('0x6'),_0x1bfbb6[_0x41ee('0x5')]),this['a'][_0x41ee('0x0')]('MarkerOperation',_0x333a3e[_0x41ee('0x5')]),this['a'][_0x41ee('0x0')](_0x41ee('0x7'),_0x10f085['description']),this['a']['registerDescriptor'](_0x41ee('0x8'),_0x574243[_0x41ee('0x5')]),this['a'][_0x41ee('0x0')]('RenameOperation',_0xcce358[_0x41ee('0x5')]),this['a'][_0x41ee('0x0')](_0x41ee('0x9'),_0x1e284d[_0x41ee('0x5')]),this['a'][_0x41ee('0x0')](_0x41ee('0xa'),_0x5bab60[_0x41ee('0x5')]),this['a'][_0x41ee('0xb')](),this['c'](0x1,_0x41ee('0xc'),new _0x4478da(0x1,_0x41ee('0xc'))),this['O'](0xa,'AttributeOperation',_0x3ef745),this['O'](0xb,_0x41ee('0x6'),_0x1bfbb6),this['O'](0xc,_0x41ee('0xd'),_0x333a3e),this['O'](0xd,'MergeOperation',_0x10f085),this['O'](0xe,_0x41ee('0x8'),_0x574243),this['O'](0xf,_0x41ee('0xe'),_0xcce358),this['O'](0x10,'RootAttributeOperation',_0x1e284d),this['O'](0x11,_0x41ee('0xa'),_0x5bab60),this['C'](0x64,_0x41ee('0xf'),_0x3826ad),this['C'](0x65,_0x41ee('0x10'),_0x49a30d),this['C'](0x66,_0x41ee('0x11'),_0x17b900),this['C'](0x67,_0x41ee('0x12'),_0x38474f);}['O'](o,r,e){const t=new e(o,r,this['a']['getDescriptor'](r));this['c'](o,r,t);}['C'](o,r,e){const t=new e(o,this);this['c'](o,r,t);}['c'](o,r,e){this['p'][_0x41ee('0x13')](o,e),this['m'][_0x41ee('0x13')](r,e);}['n'](o){return this['m']['get'](o);}['compress'](o){const r={'types':[],'buffers':[],'baseVersion':o[0x0]['baseVersion']};for(;o[_0x41ee('0x14')];)this['n'](_0x41ee('0x12'))['compress'](r,o)||this['n'](_0x41ee('0xf'))['compress'](r,o)||this['n'](_0x41ee('0x10'))[_0x41ee('0x15')](r,o)||this['n'](_0x41ee('0x11'))[_0x41ee('0x15')](r,o)||this['n'](o[0x0][_0x41ee('0x16')])[_0x41ee('0x15')](r,o);return r;}[_0x41ee('0x17')](o){const r=[];for(;o[_0x41ee('0x18')][_0x41ee('0x14')];){this['p']['get'](o['types'][0x0])[_0x41ee('0x17')](r,o);}return r[_0x41ee('0x19')]((r,e)=>r[_0x41ee('0x1a')]=o[_0x41ee('0x1a')]+e),r;}}; | ||
var _0x586b=['set','get','compress','baseVersion','length','TypingAction','__className','decompress','types','forEach','registerDescriptor','Position','Range','Element','InsertOperation','description','MarkerOperation','MergeOperation','MoveOperation','RootAttributeOperation','SplitOperation','build','NoOperation','AttributeOperation','getDescriptor','CommentMarkerOperation','SuggestionMarkerOperation','suggestion','DeletingAction','ForwardDeletingAction','UserSelectionAction'];(function(_0x1a10dd,_0x454a21){var _0x39658d=function(_0x537b68){while(--_0x537b68){_0x1a10dd['push'](_0x1a10dd['shift']());}};_0x39658d(++_0x454a21);}(_0x586b,0x140));var _0x530f=function(_0x45ac96,_0x2a4e15){_0x45ac96=_0x45ac96-0x0;var _0x347213=_0x586b[_0x45ac96];return _0x347213;};import _0x1d54da from'./protobuffactory';import _0x3134cb from'./commondescriptions';import _0x36a078 from'./operationcompressor/attributeoperationcompressor';import _0x11fe98 from'./operationcompressor/insertoperationcompressor';import _0x8c2693 from'./operationcompressor/markeroperationcompressor';import _0x4313a0 from'./operationcompressor/mergeoperationcompressor';import _0x4d2baf from'./operationcompressor/moveoperationcompressor';import _0x157424 from'./operationcompressor/renameoperationcompressor';import _0x1bc983 from'./operationcompressor/rootattributeoperationcompressor';import _0x51dcb1 from'./operationcompressor/splitoperationcompressor';import _0x250714 from'./operationcompressor/nooperationcompressor';import _0x2bf492 from'./operationcompressor/annotationmarkeroperationcompressor';import _0x221a1c from'./actioncompressor/typingactioncompressor';import _0xfc83e7 from'./actioncompressor/deletingactioncompressor';import _0x5e7307 from'./actioncompressor/forwarddeletingactioncompressor';import _0x1c6683 from'./actioncompressor/userselectionactioncompressor';export default class Compressor{constructor(){this['p']=new Map(),this['m']=new Map(),this['a']=new _0x1d54da(),this['a'][_0x530f('0x0')](_0x530f('0x1'),_0x3134cb['Position']),this['a'][_0x530f('0x0')](_0x530f('0x2'),_0x3134cb['Range']),this['a'][_0x530f('0x0')](_0x530f('0x3'),_0x3134cb[_0x530f('0x3')]),this['a'][_0x530f('0x0')]('AttributeOperation',_0x36a078['description']),this['a'][_0x530f('0x0')](_0x530f('0x4'),_0x11fe98[_0x530f('0x5')]),this['a'][_0x530f('0x0')](_0x530f('0x6'),_0x8c2693[_0x530f('0x5')]),this['a'][_0x530f('0x0')](_0x530f('0x7'),_0x4313a0['description']),this['a']['registerDescriptor'](_0x530f('0x8'),_0x4d2baf[_0x530f('0x5')]),this['a'][_0x530f('0x0')]('RenameOperation',_0x157424[_0x530f('0x5')]),this['a'][_0x530f('0x0')](_0x530f('0x9'),_0x1bc983['description']),this['a'][_0x530f('0x0')](_0x530f('0xa'),_0x51dcb1[_0x530f('0x5')]),this['a'][_0x530f('0xb')](),this['c'](0x1,_0x530f('0xc'),new _0x250714(0x1,_0x530f('0xc'))),this['O'](0xa,_0x530f('0xd'),_0x36a078),this['O'](0xb,_0x530f('0x4'),_0x11fe98),this['O'](0xc,_0x530f('0x6'),_0x8c2693),this['O'](0xd,_0x530f('0x7'),_0x4313a0),this['O'](0xe,_0x530f('0x8'),_0x4d2baf),this['O'](0xf,'RenameOperation',_0x157424),this['O'](0x10,'RootAttributeOperation',_0x1bc983),this['O'](0x11,_0x530f('0xa'),_0x51dcb1);const o=this['a'][_0x530f('0xe')](_0x530f('0x6'));this['c'](0x12,_0x530f('0xf'),new _0x2bf492(0x12,'MarkerOperation',o,'comment')),this['c'](0x13,_0x530f('0x10'),new _0x2bf492(0x13,'MarkerOperation',o,_0x530f('0x11'))),this['C'](0x64,'TypingAction',_0x221a1c),this['C'](0x65,_0x530f('0x12'),_0xfc83e7),this['C'](0x66,_0x530f('0x13'),_0x5e7307),this['C'](0x67,_0x530f('0x14'),_0x1c6683);}['O'](o,r,e){const t=new e(o,r,this['a'][_0x530f('0xe')](r));this['c'](o,r,t);}['C'](o,r,e){const t=new e(o,this);this['c'](o,r,t);}['c'](o,r,e){this['p'][_0x530f('0x15')](o,e),this['m'][_0x530f('0x15')](r,e);}['n'](o){return this['m'][_0x530f('0x16')](o);}[_0x530f('0x17')](o){const r={'types':[],'buffers':[],'baseVersion':o[0x0][_0x530f('0x18')]};for(;o[_0x530f('0x19')];)this['n'](_0x530f('0x14'))[_0x530f('0x17')](r,o)||this['n'](_0x530f('0x1a'))[_0x530f('0x17')](r,o)||this['n'](_0x530f('0x12'))[_0x530f('0x17')](r,o)||this['n'](_0x530f('0x13'))[_0x530f('0x17')](r,o)||this['n'](_0x530f('0xf'))[_0x530f('0x17')](r,o)||this['n'](_0x530f('0x10'))['compress'](r,o)||this['n'](o[0x0][_0x530f('0x1b')])[_0x530f('0x17')](r,o);return r;}[_0x530f('0x1c')](o){const r=[];for(;o['types'][_0x530f('0x19')];){this['p'][_0x530f('0x16')](o[_0x530f('0x1d')][0x0])[_0x530f('0x1c')](r,o);}return r[_0x530f('0x1e')]((r,e)=>r['baseVersion']=o['baseVersion']+e),r;}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x1941=['compress','oldValue','newValue','push','_protobufDescriptor','types','decompress','shift','__className','operationName','boolean','stringify','Json','parse','Boolean','description','Range','bool','string'];(function(_0x4fa8de,_0x560aaa){var _0x4a98c6=function(_0xd3da62){while(--_0xd3da62){_0x4fa8de['push'](_0x4fa8de['shift']());}};_0x4a98c6(++_0x560aaa);}(_0x1941,0xcd));var _0x1362=function(_0x1b47fe,_0x2ebf08){_0x1b47fe=_0x1b47fe-0x0;var _0x5bc6f2=_0x1941[_0x1b47fe];return _0x5bc6f2;};import _0x4839cd from'./operationcompressor';import{parsePositionBeforeCompression,parsePositionAfterCompression}from'../utils';export default class AttributeOperationCompressor extends _0x4839cd{static get[_0x1362('0x0')](){return{'fields':{'range':{'type':_0x1362('0x1'),'id':0x1},'key':{'type':'string','id':0x2},'oldValueBoolean':{'type':_0x1362('0x2'),'id':0x3},'oldValueJson':{'type':_0x1362('0x3'),'id':0x4},'newValueBoolean':{'type':_0x1362('0x2'),'id':0x5},'newValueJson':{'type':_0x1362('0x3'),'id':0x6},'wasUndone':{'type':'bool','id':0x7}}};}[_0x1362('0x4')](e,o){const s=o['shift']();_serializeOneOf(_0x1362('0x5'),s),_serializeOneOf(_0x1362('0x6'),s),parsePositionBeforeCompression(s),e['buffers'][_0x1362('0x7')](this[_0x1362('0x8')][_0x1362('0x4')](s)),e[_0x1362('0x9')][_0x1362('0x7')](this['id']);}[_0x1362('0xa')](e,o){const {types:s,buffers:i}=o,n=this[_0x1362('0x8')][_0x1362('0xa')](i[_0x1362('0xb')]());s[_0x1362('0xb')](),_deserializeOneOf(_0x1362('0x5'),n),_deserializeOneOf('newValue',n),parsePositionAfterCompression(n),n[_0x1362('0xc')]=this[_0x1362('0xd')],e[_0x1362('0x7')](n);}};function _serializeOneOf(e,o){const s=o[e];_0x1362('0xe')==typeof s?o[e+'Boolean']=s:o[e+'Json']=JSON[_0x1362('0xf')](s);}function _deserializeOneOf(e,o){const s=e+_0x1362('0x10');o[s]?(o[e]=JSON[_0x1362('0x11')](o[s]),delete o[s]):(o[e]=o[e+_0x1362('0x12')],delete o[e+_0x1362('0x12')]);} | ||
var _0x59fd=['Range','string','bool','compress','shift','oldValue','newValue','buffers','push','decompress','_protobufDescriptor','__className','operationName','boolean','Boolean','stringify','Json','parse','description'];(function(_0x2699a9,_0x501e82){var _0x5b6c40=function(_0xa3de42){while(--_0xa3de42){_0x2699a9['push'](_0x2699a9['shift']());}};_0x5b6c40(++_0x501e82);}(_0x59fd,0x109));var _0x2f23=function(_0x1c6df9,_0x278e57){_0x1c6df9=_0x1c6df9-0x0;var _0x514ad5=_0x59fd[_0x1c6df9];return _0x514ad5;};import _0x1e0612 from'./operationcompressor';import{parsePositionBeforeCompression,parsePositionAfterCompression}from'../utils';export default class AttributeOperationCompressor extends _0x1e0612{static get[_0x2f23('0x0')](){return{'fields':{'range':{'type':_0x2f23('0x1'),'id':0x1},'key':{'type':_0x2f23('0x2'),'id':0x2},'oldValueBoolean':{'type':_0x2f23('0x3'),'id':0x3},'oldValueJson':{'type':_0x2f23('0x2'),'id':0x4},'newValueBoolean':{'type':_0x2f23('0x3'),'id':0x5},'newValueJson':{'type':_0x2f23('0x2'),'id':0x6},'wasUndone':{'type':_0x2f23('0x3'),'id':0x7}}};}[_0x2f23('0x4')](e,o){const s=o[_0x2f23('0x5')]();_serializeOneOf(_0x2f23('0x6'),s),_serializeOneOf(_0x2f23('0x7'),s),parsePositionBeforeCompression(s),e[_0x2f23('0x8')][_0x2f23('0x9')](this['_protobufDescriptor'][_0x2f23('0x4')](s)),e['types'][_0x2f23('0x9')](this['id']);}[_0x2f23('0xa')](e,o){const {types:s,buffers:i}=o,n=this[_0x2f23('0xb')][_0x2f23('0xa')](i[_0x2f23('0x5')]());s[_0x2f23('0x5')](),_deserializeOneOf(_0x2f23('0x6'),n),_deserializeOneOf('newValue',n),parsePositionAfterCompression(n),n[_0x2f23('0xc')]=this[_0x2f23('0xd')],e[_0x2f23('0x9')](n);}};function _serializeOneOf(e,o){const s=o[e];_0x2f23('0xe')==typeof s?o[e+_0x2f23('0xf')]=s:o[e+'Json']=JSON[_0x2f23('0x10')](s);}function _deserializeOneOf(e,o){const s=e+_0x2f23('0x11');o[s]?(o[e]=JSON[_0x2f23('0x12')](o[s]),delete o[s]):(o[e]=o[e+'Boolean'],delete o[e+_0x2f23('0xf')]);} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x3424=['_protobufDescriptor','decompress','__className','operationName','attributes','attributesBoolean','attributesJson','children','parse','keys','description','Position','repeated','Element','bool','shift','nodes','buffers','push'];(function(_0x63170d,_0xd2500c){var _0x5a7f2a=function(_0x4b83c6){while(--_0x4b83c6){_0x63170d['push'](_0x63170d['shift']());}};_0x5a7f2a(++_0xd2500c);}(_0x3424,0xa2));var _0xe732=function(_0x4002c0,_0x51476d){_0x4002c0=_0x4002c0-0x0;var _0xc94b6c=_0x3424[_0x4002c0];return _0xc94b6c;};import _0x36b5a2 from'./operationcompressor';import{parsePositionBeforeCompression,parsePositionAfterCompression}from'../utils';export default class InsertOperationCompressor extends _0x36b5a2{static get[_0xe732('0x0')](){return{'fields':{'position':{'type':_0xe732('0x1'),'id':0x1},'nodes':{'rule':_0xe732('0x2'),'type':_0xe732('0x3'),'id':0x2},'shouldReceiveAttributes':{'type':_0xe732('0x4'),'id':0x3},'wasUndone':{'type':'bool','id':0x4}}};}['compress'](e,o){const s=o[_0xe732('0x5')]();_serializeNodesAttributes(s[_0xe732('0x6')]),parsePositionBeforeCompression(s),e[_0xe732('0x7')][_0xe732('0x8')](this[_0xe732('0x9')]['compress'](s)),e['types'][_0xe732('0x8')](this['id']);}['decompress'](e,o){const {types:s,buffers:t}=o,i=this[_0xe732('0x9')][_0xe732('0xa')](t[_0xe732('0x5')]());s['shift'](),_deserializeNodesAttributes(i['nodes']),parsePositionAfterCompression(i),i[_0xe732('0xb')]=this[_0xe732('0xc')],e[_0xe732('0x8')](i);}};function _serializeNodesAttributes(e){for(const o of e){if(o[_0xe732('0xd')]){const e=o[_0xe732('0xd')];_areValuesBoolean(e)?o[_0xe732('0xe')]=e:o[_0xe732('0xf')]=JSON['stringify'](e);}o[_0xe732('0x10')]&&_serializeNodesAttributes(o[_0xe732('0x10')]);}}function _deserializeNodesAttributes(e){for(const o of e)(o[_0xe732('0xe')]||o['attributesJson'])&&(o[_0xe732('0xe')]?(o[_0xe732('0xd')]=o[_0xe732('0xe')],delete o['attributesBoolean']):(o['attributes']=JSON[_0xe732('0x11')](o[_0xe732('0xf')]),delete o[_0xe732('0xf')])),o[_0xe732('0x10')]&&_deserializeNodesAttributes(o[_0xe732('0x10')]);}function _areValuesBoolean(e){return Object[_0xe732('0x12')](e)['every'](o=>'boolean'==typeof e[o]);} | ||
var _0x5dee=['types','decompress','shift','__className','attributes','attributesBoolean','attributesJson','stringify','children','parse','keys','boolean','description','repeated','Element','bool','compress','nodes','buffers','push','_protobufDescriptor'];(function(_0xe75d4e,_0x45bd69){var _0x3663ea=function(_0x2ceaa7){while(--_0x2ceaa7){_0xe75d4e['push'](_0xe75d4e['shift']());}};_0x3663ea(++_0x45bd69);}(_0x5dee,0x1b0));var _0x3784=function(_0x10f6cd,_0x5b8bcc){_0x10f6cd=_0x10f6cd-0x0;var _0x2efd36=_0x5dee[_0x10f6cd];return _0x2efd36;};import _0x5e3a98 from'./operationcompressor';import{parsePositionBeforeCompression,parsePositionAfterCompression}from'../utils';export default class InsertOperationCompressor extends _0x5e3a98{static get[_0x3784('0x0')](){return{'fields':{'position':{'type':'Position','id':0x1},'nodes':{'rule':_0x3784('0x1'),'type':_0x3784('0x2'),'id':0x2},'shouldReceiveAttributes':{'type':_0x3784('0x3'),'id':0x3},'wasUndone':{'type':_0x3784('0x3'),'id':0x4}}};}[_0x3784('0x4')](e,o){const s=o['shift']();_serializeNodesAttributes(s[_0x3784('0x5')]),parsePositionBeforeCompression(s),e[_0x3784('0x6')][_0x3784('0x7')](this[_0x3784('0x8')][_0x3784('0x4')](s)),e[_0x3784('0x9')]['push'](this['id']);}['decompress'](e,o){const {types:s,buffers:t}=o,i=this[_0x3784('0x8')][_0x3784('0xa')](t[_0x3784('0xb')]());s[_0x3784('0xb')](),_deserializeNodesAttributes(i[_0x3784('0x5')]),parsePositionAfterCompression(i),i[_0x3784('0xc')]=this['operationName'],e[_0x3784('0x7')](i);}};function _serializeNodesAttributes(e){for(const o of e){if(o[_0x3784('0xd')]){const e=o['attributes'];_areValuesBoolean(e)?o[_0x3784('0xe')]=e:o[_0x3784('0xf')]=JSON[_0x3784('0x10')](e);}o[_0x3784('0x11')]&&_serializeNodesAttributes(o[_0x3784('0x11')]);}}function _deserializeNodesAttributes(e){for(const o of e)(o[_0x3784('0xe')]||o[_0x3784('0xf')])&&(o[_0x3784('0xe')]?(o[_0x3784('0xd')]=o['attributesBoolean'],delete o['attributesBoolean']):(o[_0x3784('0xd')]=JSON[_0x3784('0x12')](o[_0x3784('0xf')]),delete o[_0x3784('0xf')])),o[_0x3784('0x11')]&&_deserializeNodesAttributes(o[_0x3784('0x11')]);}function _areValuesBoolean(e){return Object[_0x3784('0x13')](e)['every'](o=>_0x3784('0x14')==typeof e[o]);} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x2679=['string','Range','bool','length','newRange','description'];(function(_0xda44d3,_0x22a71b){var _0x93e6f8=function(_0x3a88ba){while(--_0x3a88ba){_0xda44d3['push'](_0xda44d3['shift']());}};_0x93e6f8(++_0x22a71b);}(_0x2679,0x16d));var _0x2e86=function(_0x2a25aa,_0x21d2c0){_0x2a25aa=_0x2a25aa-0x0;var _0x5060ca=_0x2679[_0x2a25aa];return _0x5060ca;};import _0x13f2cb from'./operationcompressor';export default class MarkerOperationCompressor extends _0x13f2cb{static get[_0x2e86('0x0')](){return{'fields':{'name':{'type':_0x2e86('0x1'),'id':0x1},'oldRange':{'type':_0x2e86('0x2'),'id':0x2},'newRange':{'type':'Range','id':0x3},'affectsData':{'type':_0x2e86('0x3'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}};}['decompress'](_0x35ee05,_0x3f95e8){super['decompress'](_0x35ee05,_0x3f95e8);const _0x5d5744=_0x35ee05[_0x35ee05[_0x2e86('0x4')]-0x1];_0x5d5744['oldRange']||(_0x5d5744['oldRange']=null),_0x5d5744[_0x2e86('0x5')]||(_0x5d5744['newRange']=null);}}; | ||
var _0x217b=['string','Range','bool','decompress','length','oldRange','newRange','description'];(function(_0x554467,_0x24fb3f){var _0x303f40=function(_0x506a4a){while(--_0x506a4a){_0x554467['push'](_0x554467['shift']());}};_0x303f40(++_0x24fb3f);}(_0x217b,0x1e7));var _0x139b=function(_0xa9fd35,_0x10eb4a){_0xa9fd35=_0xa9fd35-0x0;var _0x138bad=_0x217b[_0xa9fd35];return _0x138bad;};import _0x141ba4 from'./operationcompressor';export default class MarkerOperationCompressor extends _0x141ba4{static get[_0x139b('0x0')](){return{'fields':{'name':{'type':_0x139b('0x1'),'id':0x1},'oldRange':{'type':'Range','id':0x2},'newRange':{'type':_0x139b('0x2'),'id':0x3},'affectsData':{'type':_0x139b('0x3'),'id':0x4},'wasUndone':{'type':_0x139b('0x3'),'id':0x5}}};}[_0x139b('0x4')](_0x46165a,_0x4662e7){super[_0x139b('0x4')](_0x46165a,_0x4662e7);const _0x3528ab=_0x46165a[_0x46165a[_0x139b('0x5')]-0x1];_0x3528ab[_0x139b('0x6')]||(_0x3528ab[_0x139b('0x6')]=null),_0x3528ab[_0x139b('0x7')]||(_0x3528ab[_0x139b('0x7')]=null);}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x1e64=['bool','description','uint32'];(function(_0x2f904a,_0x15c942){var _0x55d54c=function(_0x1fc306){while(--_0x1fc306){_0x2f904a['push'](_0x2f904a['shift']());}};_0x55d54c(++_0x15c942);}(_0x1e64,0xd3));var _0x5121=function(_0x2d8f05,_0x4b81bb){_0x2d8f05=_0x2d8f05-0x0;var _0x4d74cb=_0x1e64[_0x2d8f05];return _0x4d74cb;};import _0x581612 from'./operationcompressor';export default class MergeOperationCompressor extends _0x581612{static get[_0x5121('0x0')](){return{'fields':{'sourcePosition':{'type':'Position','id':0x1},'targetPosition':{'type':'Position','id':0x2},'graveyardPosition':{'type':'Position','id':0x3},'howMany':{'type':_0x5121('0x1'),'id':0x4},'wasUndone':{'type':_0x5121('0x2'),'id':0x5}}};}}; | ||
var _0x6534=['Position','uint32','bool','description'];(function(_0x311b4f,_0x15c125){var _0x1ba0d2=function(_0x9a55bb){while(--_0x9a55bb){_0x311b4f['push'](_0x311b4f['shift']());}};_0x1ba0d2(++_0x15c125);}(_0x6534,0xe3));var _0x14ca=function(_0x48ba47,_0x6fe5f2){_0x48ba47=_0x48ba47-0x0;var _0x5d0d3c=_0x6534[_0x48ba47];return _0x5d0d3c;};import _0x277342 from'./operationcompressor';export default class MergeOperationCompressor extends _0x277342{static get[_0x14ca('0x0')](){return{'fields':{'sourcePosition':{'type':'Position','id':0x1},'targetPosition':{'type':'Position','id':0x2},'graveyardPosition':{'type':_0x14ca('0x1'),'id':0x3},'howMany':{'type':_0x14ca('0x2'),'id':0x4},'wasUndone':{'type':_0x14ca('0x3'),'id':0x5}}};}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x3f26=['Position','uint32','bool','description'];(function(_0x1a7ced,_0x11276d){var _0x5262d3=function(_0x4cfdab){while(--_0x4cfdab){_0x1a7ced['push'](_0x1a7ced['shift']());}};_0x5262d3(++_0x11276d);}(_0x3f26,0x133));var _0x2fc5=function(_0x4e5de0,_0x2dc08e){_0x4e5de0=_0x4e5de0-0x0;var _0xc35610=_0x3f26[_0x4e5de0];return _0xc35610;};import _0x7e2615 from'./operationcompressor';export default class MoveOperationCompressor extends _0x7e2615{static get[_0x2fc5('0x0')](){return{'fields':{'sourcePosition':{'type':_0x2fc5('0x1'),'id':0x1},'howMany':{'type':_0x2fc5('0x2'),'id':0x2},'targetPosition':{'type':_0x2fc5('0x1'),'id':0x3},'wasUndone':{'type':_0x2fc5('0x3'),'id':0x4}}};}}; | ||
var _0x5973=['uint32','Position'];(function(_0x5db53a,_0x1e5a93){var _0x2b0c58=function(_0x351337){while(--_0x351337){_0x5db53a['push'](_0x5db53a['shift']());}};_0x2b0c58(++_0x1e5a93);}(_0x5973,0x8b));var _0x227c=function(_0x4e3c82,_0x849ca){_0x4e3c82=_0x4e3c82-0x0;var _0x59c81f=_0x5973[_0x4e3c82];return _0x59c81f;};import _0xa636f5 from'./operationcompressor';export default class MoveOperationCompressor extends _0xa636f5{static get['description'](){return{'fields':{'sourcePosition':{'type':_0x227c('0x0'),'id':0x1},'howMany':{'type':_0x227c('0x1'),'id':0x2},'targetPosition':{'type':_0x227c('0x0'),'id':0x3},'wasUndone':{'type':'bool','id':0x4}}};}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x33e3=['types','decompress','push','operationName','shift'];(function(_0x2e2d2c,_0xcf46f3){var _0x5962b9=function(_0x28e6cc){while(--_0x28e6cc){_0x2e2d2c['push'](_0x2e2d2c['shift']());}};_0x5962b9(++_0xcf46f3);}(_0x33e3,0x176));var _0x1b68=function(_0x2ab5bb,_0x31fc00){_0x2ab5bb=_0x2ab5bb-0x0;var _0x5406be=_0x33e3[_0x2ab5bb];return _0x5406be;};import _0x2143c1 from'./operationcompressor';export default class NoOperationCompressor extends _0x2143c1{['compress'](_0x147eb7,_0x79dbe1){_0x79dbe1[_0x1b68('0x0')](),_0x147eb7[_0x1b68('0x1')]['push'](this['id']);}[_0x1b68('0x2')](_0x49e402,_0x628499){_0x628499['types'][_0x1b68('0x0')](),_0x49e402[_0x1b68('0x3')]({'__className':this[_0x1b68('0x4')]});}}; | ||
var _0x15a7=['push','decompress','operationName','compress','shift','types'];(function(_0x589f7e,_0x199a91){var _0x4053b2=function(_0x5c43c0){while(--_0x5c43c0){_0x589f7e['push'](_0x589f7e['shift']());}};_0x4053b2(++_0x199a91);}(_0x15a7,0x7b));var _0x131d=function(_0x1446a7,_0x515370){_0x1446a7=_0x1446a7-0x0;var _0x242d90=_0x15a7[_0x1446a7];return _0x242d90;};import _0x4bef74 from'./operationcompressor';export default class NoOperationCompressor extends _0x4bef74{[_0x131d('0x0')](_0x7975f7,_0x285f08){_0x285f08[_0x131d('0x1')](),_0x7975f7[_0x131d('0x2')][_0x131d('0x3')](this['id']);}[_0x131d('0x4')](_0x1a517e,_0x3280b4){_0x3280b4[_0x131d('0x2')][_0x131d('0x1')](),_0x1a517e['push']({'__className':this[_0x131d('0x5')]});}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x9694=['push','operationName','_protobufDescriptor','compress','shift','buffers','types','decompress'];(function(_0x32cb1c,_0x146b35){var _0x2f2a19=function(_0x40021b){while(--_0x40021b){_0x32cb1c['push'](_0x32cb1c['shift']());}};_0x2f2a19(++_0x146b35);}(_0x9694,0x1f1));var _0x104b=function(_0x31994a,_0xcb746c){_0x31994a=_0x31994a-0x0;var _0x1e7102=_0x9694[_0x31994a];return _0x1e7102;};import{parsePositionBeforeCompression,parsePositionAfterCompression}from'../utils';export default class OperationCompressor{constructor(_0xe66bbf,_0x23658e,_0x35f01d){this['id']=_0xe66bbf,this[_0x104b('0x0')]=_0x23658e,this[_0x104b('0x1')]=_0x35f01d;}[_0x104b('0x2')](_0x3834a8,_0x3b94e8){const _0x508326=_0x3b94e8[_0x104b('0x3')]();parsePositionBeforeCompression(_0x508326),_0x3834a8[_0x104b('0x4')]['push'](this[_0x104b('0x1')][_0x104b('0x2')](_0x508326)),_0x3834a8[_0x104b('0x5')]['push'](this['id']);}[_0x104b('0x6')](_0x13d503,_0x7aa0c4){_0x7aa0c4[_0x104b('0x5')][_0x104b('0x3')]();const _0x471735=this[_0x104b('0x1')][_0x104b('0x6')](_0x7aa0c4['buffers'][_0x104b('0x3')]());parsePositionAfterCompression(_0x471735),_0x471735['__className']=this[_0x104b('0x0')],_0x13d503[_0x104b('0x7')](_0x471735);}}; | ||
var _0x5f28=['push','_protobufDescriptor','types','decompress','__className','operationName','compress','shift','buffers'];(function(_0xc0e9b9,_0x292261){var _0x104485=function(_0x270e19){while(--_0x270e19){_0xc0e9b9['push'](_0xc0e9b9['shift']());}};_0x104485(++_0x292261);}(_0x5f28,0x1be));var _0x3298=function(_0xee8318,_0x3f9fb5){_0xee8318=_0xee8318-0x0;var _0x1b035c=_0x5f28[_0xee8318];return _0x1b035c;};import{parsePositionBeforeCompression,parsePositionAfterCompression}from'../utils';export default class OperationCompressor{constructor(_0x5c2539,_0x1a3ec6,_0x1025ac){this['id']=_0x5c2539,this[_0x3298('0x0')]=_0x1a3ec6,this['_protobufDescriptor']=_0x1025ac;}[_0x3298('0x1')](_0x44f1a4,_0x3a77ac){const _0x14b6b7=_0x3a77ac[_0x3298('0x2')]();parsePositionBeforeCompression(_0x14b6b7),_0x44f1a4[_0x3298('0x3')][_0x3298('0x4')](this[_0x3298('0x5')][_0x3298('0x1')](_0x14b6b7)),_0x44f1a4[_0x3298('0x6')][_0x3298('0x4')](this['id']);}[_0x3298('0x7')](_0x5618d3,_0xce4e5c){_0xce4e5c[_0x3298('0x6')][_0x3298('0x2')]();const _0x3cc0d6=this['_protobufDescriptor'][_0x3298('0x7')](_0xce4e5c['buffers']['shift']());parsePositionAfterCompression(_0x3cc0d6),_0x3cc0d6[_0x3298('0x8')]=this[_0x3298('0x0')],_0x5618d3[_0x3298('0x4')](_0x3cc0d6);}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x4186=['bool','description','Position','string'];(function(_0x117e19,_0x1c52c7){var _0x5a9e74=function(_0x46fbc5){while(--_0x46fbc5){_0x117e19['push'](_0x117e19['shift']());}};_0x5a9e74(++_0x1c52c7);}(_0x4186,0xb1));var _0x26f4=function(_0x57984a,_0x16af5f){_0x57984a=_0x57984a-0x0;var _0x13f8be=_0x4186[_0x57984a];return _0x13f8be;};import _0x28ea44 from'./operationcompressor';export default class RenameOperationCompressor extends _0x28ea44{static get[_0x26f4('0x0')](){return{'fields':{'position':{'type':_0x26f4('0x1'),'id':0x1},'oldName':{'type':_0x26f4('0x2'),'id':0x2},'newName':{'type':_0x26f4('0x2'),'id':0x3},'wasUndone':{'type':_0x26f4('0x3'),'id':0x4}}};}}; | ||
var _0x2e1a=['Position','string','bool'];(function(_0x20c944,_0x29cbad){var _0x5140e4=function(_0x189543){while(--_0x189543){_0x20c944['push'](_0x20c944['shift']());}};_0x5140e4(++_0x29cbad);}(_0x2e1a,0x16b));var _0x7c8e=function(_0xda7472,_0x5c4b5e){_0xda7472=_0xda7472-0x0;var _0x17ef28=_0x2e1a[_0xda7472];return _0x17ef28;};import _0x282178 from'./operationcompressor';export default class RenameOperationCompressor extends _0x282178{static get['description'](){return{'fields':{'position':{'type':_0x7c8e('0x0'),'id':0x1},'oldName':{'type':_0x7c8e('0x1'),'id':0x2},'newName':{'type':_0x7c8e('0x1'),'id':0x3},'wasUndone':{'type':_0x7c8e('0x2'),'id':0x4}}};}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x5238=['description','fields','range','root','string'];(function(_0x2ca36c,_0x391e13){var _0x229cb1=function(_0x2c9aea){while(--_0x2c9aea){_0x2ca36c['push'](_0x2ca36c['shift']());}};_0x229cb1(++_0x391e13);}(_0x5238,0xe6));var _0x48c2=function(_0x29aa46,_0x590bd3){_0x29aa46=_0x29aa46-0x0;var _0x3dd47e=_0x5238[_0x29aa46];return _0x3dd47e;};import _0x4f1dc3 from'./attributeoperationcompressor';export default class RootAttributeOperationCompressor extends _0x4f1dc3{static get[_0x48c2('0x0')](){const _0x15328e=_0x4f1dc3[_0x48c2('0x0')];return delete _0x15328e[_0x48c2('0x1')][_0x48c2('0x2')],_0x15328e[_0x48c2('0x1')][_0x48c2('0x3')]={'type':_0x48c2('0x4'),'id':0x1},_0x15328e;}}; | ||
var _0x9884=['root','string','description','fields'];(function(_0x1a753d,_0x28c440){var _0x875da3=function(_0x25168a){while(--_0x25168a){_0x1a753d['push'](_0x1a753d['shift']());}};_0x875da3(++_0x28c440);}(_0x9884,0x146));var _0x1117=function(_0x33e9b3,_0x397fcf){_0x33e9b3=_0x33e9b3-0x0;var _0x56b8eb=_0x9884[_0x33e9b3];return _0x56b8eb;};import _0x36dd64 from'./attributeoperationcompressor';export default class RootAttributeOperationCompressor extends _0x36dd64{static get[_0x1117('0x0')](){const _0x419d68=_0x36dd64['description'];return delete _0x419d68['fields']['range'],_0x419d68[_0x1117('0x1')][_0x1117('0x2')]={'type':_0x1117('0x3'),'id':0x1},_0x419d68;}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x5ab3=['Position','uint32','bool','description'];(function(_0x8e609d,_0xebb292){var _0x5d337d=function(_0x3f5b13){while(--_0x3f5b13){_0x8e609d['push'](_0x8e609d['shift']());}};_0x5d337d(++_0xebb292);}(_0x5ab3,0x1b3));var _0x3506=function(_0x1e94a5,_0x2b68bc){_0x1e94a5=_0x1e94a5-0x0;var _0xc9e2bc=_0x5ab3[_0x1e94a5];return _0xc9e2bc;};import _0x9f8a7e from'./operationcompressor';export default class SplitOperationCompressor extends _0x9f8a7e{static get[_0x3506('0x0')](){return{'fields':{'splitPosition':{'type':_0x3506('0x1'),'id':0x1},'graveyardPosition':{'type':_0x3506('0x1'),'id':0x2},'howMany':{'type':_0x3506('0x2'),'id':0x3},'insertionPosition':{'type':_0x3506('0x1'),'id':0x4},'wasUndone':{'type':_0x3506('0x3'),'id':0x5}}};}}; | ||
var _0xa50a=['Position','uint32','bool'];(function(_0x1110c0,_0x463474){var _0x546015=function(_0x5d9a0d){while(--_0x5d9a0d){_0x1110c0['push'](_0x1110c0['shift']());}};_0x546015(++_0x463474);}(_0xa50a,0xd5));var _0x4d48=function(_0x5191d4,_0x12053a){_0x5191d4=_0x5191d4-0x0;var _0x13ac2b=_0xa50a[_0x5191d4];return _0x13ac2b;};import _0x485a81 from'./operationcompressor';export default class SplitOperationCompressor extends _0x485a81{static get['description'](){return{'fields':{'splitPosition':{'type':_0x4d48('0x0'),'id':0x1},'graveyardPosition':{'type':_0x4d48('0x0'),'id':0x2},'howMany':{'type':_0x4d48('0x1'),'id':0x3},'insertionPosition':{'type':_0x4d48('0x0'),'id':0x4},'wasUndone':{'type':_0x4d48('0x2'),'id':0x5}}};}}; |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x4d96=['Cannot\x20get\x20descriptor\x20before\x20build.','lookupType','compress','verify','finish','decompress','toObject','registerDescriptor','nested','Root','fromJSON','getDescriptor'];(function(_0x308bc6,_0xa9466a){var _0x32c4b2=function(_0x6f6c47){while(--_0x6f6c47){_0x308bc6['push'](_0x308bc6['shift']());}};_0x32c4b2(++_0xa9466a);}(_0x4d96,0x163));var _0x1c64=function(_0x11603d,_0x221b55){_0x11603d=_0x11603d-0x0;var _0x734d5e=_0x4d96[_0x11603d];return _0x734d5e;};import _0xf30ed5 from'protobufjs/light';export default class ProtobufFactory{constructor(){this['u']={'nested':{}};}[_0x1c64('0x0')](_0x3841d7,_0x3d79af){this['u'][_0x1c64('0x1')][_0x3841d7]=_0x3d79af;}['build'](){this['f']=_0xf30ed5[_0x1c64('0x2')][_0x1c64('0x3')](this['u']);}[_0x1c64('0x4')](_0x384370){if(!this['f'])throw new Error(_0x1c64('0x5'));return new ProtobufDescriptor(this['f'][_0x1c64('0x6')](_0x384370));}};class ProtobufDescriptor{constructor(_0x56b949){this['b']=_0x56b949;}[_0x1c64('0x7')](_0x450a9a){const _0x426c28=this['b'][_0x1c64('0x8')](_0x450a9a);if(_0x426c28)throw Error(_0x426c28);return this['b']['encode'](this['b']['create'](_0x450a9a))[_0x1c64('0x9')]();}[_0x1c64('0xa')](_0x33200c){return this['b'][_0x1c64('0xb')](this['b']['decode'](_0x33200c),{'oneofs':!0x0});}} | ||
var _0x42d2=['toObject','build','Root','fromJSON','getDescriptor','Cannot\x20get\x20descriptor\x20before\x20build.','lookupType','compress','create','finish'];(function(_0x1506cd,_0x333604){var _0x25427a=function(_0x3f72ac){while(--_0x3f72ac){_0x1506cd['push'](_0x1506cd['shift']());}};_0x25427a(++_0x333604);}(_0x42d2,0x19b));var _0x5108=function(_0x434838,_0x5a4ab2){_0x434838=_0x434838-0x0;var _0x4b1f3d=_0x42d2[_0x434838];return _0x4b1f3d;};import _0x1910d4 from'protobufjs/light';export default class ProtobufFactory{constructor(){this['f']={'nested':{}};}['registerDescriptor'](_0x5054bd,_0x336e95){this['f']['nested'][_0x5054bd]=_0x336e95;}[_0x5108('0x0')](){this['b']=_0x1910d4[_0x5108('0x1')][_0x5108('0x2')](this['f']);}[_0x5108('0x3')](_0x419632){if(!this['b'])throw new Error(_0x5108('0x4'));return new ProtobufDescriptor(this['b'][_0x5108('0x5')](_0x419632));}};class ProtobufDescriptor{constructor(_0x3f2f14){this['d']=_0x3f2f14;}[_0x5108('0x6')](_0xf38087){const _0x266a70=this['d']['verify'](_0xf38087);if(_0x266a70)throw Error(_0x266a70);return this['d']['encode'](this['d'][_0x5108('0x7')](_0xf38087))[_0x5108('0x8')]();}['decompress'](_0x1a2b34){return this['d'][_0x5108('0x9')](this['d']['decode'](_0x1a2b34),{'oneofs':!0x0});}} |
/* | ||
* Copyright (c) 2016 - 2018, CKSource - Frederico Knabben. All rights reserved. | ||
* Copyright (c) 2016 - 2019, CKSource - Frederico Knabben. All rights reserved. | ||
* | ||
@@ -23,2 +23,2 @@ * | ||
*/ | ||
var _0x50de=['length','root','$graveyard','rootGraveyard','rootMain','main','nodes','path'];(function(_0x516d65,_0x59cc06){var _0x5a731e=function(_0x3d9273){while(--_0x3d9273){_0x516d65['push'](_0x516d65['shift']());}};_0x5a731e(++_0x59cc06);}(_0x50de,0x11f));var _0x4dd7=function(_0x439d33,_0x4d7195){_0x439d33=_0x439d33-0x0;var _0x15fe7a=_0x50de[_0x439d33];return _0x15fe7a;};import{cloneDeep,isEqual,isObject}from'lodash-es';export function getPositionShiftedBy(_0xd84a75,_0x2fa33d){const _0x2093ae=cloneDeep(_0xd84a75);return _0x2093ae[_0x4dd7('0x0')][_0x2093ae[_0x4dd7('0x0')][_0x4dd7('0x1')]-0x1]+=_0x2fa33d,_0x2093ae;};export function arePositionsEqual(_0x1352b3,_0x447775){return _0x1352b3[_0x4dd7('0x2')]===_0x447775[_0x4dd7('0x2')]&&isEqual(_0x1352b3[_0x4dd7('0x0')],_0x447775['path']);};export function parsePositionBeforeCompression(_0x4a8efa){_mapPositions(_0x4a8efa,_0x4a8efa=>('main'==_0x4a8efa['root']?(_0x4a8efa['rootMain']=!0x0,delete _0x4a8efa[_0x4dd7('0x2')]):_0x4dd7('0x3')==_0x4a8efa[_0x4dd7('0x2')]&&(_0x4a8efa[_0x4dd7('0x4')]=!0x0,delete _0x4a8efa[_0x4dd7('0x2')]),_0x4a8efa));};export function parsePositionAfterCompression(_0x54363d){_mapPositions(_0x54363d,_0x54363d=>(_0x54363d[_0x4dd7('0x5')]?(_0x54363d[_0x4dd7('0x2')]=_0x4dd7('0x6'),delete _0x54363d['rootMain']):_0x54363d[_0x4dd7('0x4')]&&(_0x54363d['root']=_0x4dd7('0x3'),delete _0x54363d[_0x4dd7('0x4')]),_0x54363d));};function _mapPositions(_0x1da6cb,_0x16f12c){for(const _0x502239 in _0x1da6cb){const _0x4c3989=_0x1da6cb[_0x502239];_0x4dd7('0x7')!==_0x502239&&isObject(_0x4c3989)&&(_0x4c3989['path']&&(_0x4c3989[_0x4dd7('0x2')]||_0x4c3989[_0x4dd7('0x5')]||_0x4c3989[_0x4dd7('0x4')])?_0x1da6cb[_0x502239]=_0x16f12c(_0x4c3989):_mapPositions(_0x4c3989,_0x16f12c));}return _0x1da6cb;} | ||
var _0xf6e3=['root','rootMain','rootGraveyard','path','length','main'];(function(_0x35fcce,_0x2f9d7a){var _0x8423c4=function(_0x14cf93){while(--_0x14cf93){_0x35fcce['push'](_0x35fcce['shift']());}};_0x8423c4(++_0x2f9d7a);}(_0xf6e3,0x99));var _0x470f=function(_0x26911f,_0x42ef24){_0x26911f=_0x26911f-0x0;var _0x3703e8=_0xf6e3[_0x26911f];return _0x3703e8;};import{cloneDeep,isEqual,isObject}from'lodash-es';export function getPositionShiftedBy(_0x347716,_0x4fe0ae){const _0x21c0bf=cloneDeep(_0x347716);return _0x21c0bf[_0x470f('0x0')][_0x21c0bf[_0x470f('0x0')][_0x470f('0x1')]-0x1]+=_0x4fe0ae,_0x21c0bf;};export function arePositionsEqual(_0x5bf001,_0x33c91d){return _0x5bf001['root']===_0x33c91d['root']&&isEqual(_0x5bf001[_0x470f('0x0')],_0x33c91d[_0x470f('0x0')]);};export function parsePositionBeforeCompression(_0x287ad5){_mapPositions(_0x287ad5,_0x287ad5=>(_0x470f('0x2')==_0x287ad5[_0x470f('0x3')]?(_0x287ad5['rootMain']=!0x0,delete _0x287ad5[_0x470f('0x3')]):'$graveyard'==_0x287ad5['root']&&(_0x287ad5['rootGraveyard']=!0x0,delete _0x287ad5[_0x470f('0x3')]),_0x287ad5));};export function parsePositionAfterCompression(_0x430e17){_mapPositions(_0x430e17,_0x430e17=>(_0x430e17[_0x470f('0x4')]?(_0x430e17[_0x470f('0x3')]=_0x470f('0x2'),delete _0x430e17[_0x470f('0x4')]):_0x430e17[_0x470f('0x5')]&&(_0x430e17[_0x470f('0x3')]='$graveyard',delete _0x430e17[_0x470f('0x5')]),_0x430e17));};function _mapPositions(_0x2f569a,_0x457bbd){for(const _0x112c32 in _0x2f569a){const _0x277c11=_0x2f569a[_0x112c32];'nodes'!==_0x112c32&&isObject(_0x277c11)&&(_0x277c11[_0x470f('0x0')]&&(_0x277c11[_0x470f('0x3')]||_0x277c11[_0x470f('0x4')]||_0x277c11[_0x470f('0x5')])?_0x2f569a[_0x112c32]=_0x457bbd(_0x277c11):_mapPositions(_0x277c11,_0x457bbd));}return _0x2f569a;} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56291
24
440